| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /**************************************************************************** |
|---|
| 2 | 3 | * Driver for Solarflare network controllers and boards |
|---|
| 3 | 4 | * Copyright 2005-2006 Fen Systems Ltd. |
|---|
| 4 | 5 | * Copyright 2006-2013 Solarflare Communications Inc. |
|---|
| 5 | | - * |
|---|
| 6 | | - * This program is free software; you can redistribute it and/or modify it |
|---|
| 7 | | - * under the terms of the GNU General Public License version 2 as published |
|---|
| 8 | | - * by the Free Software Foundation, incorporated herein by reference. |
|---|
| 9 | 6 | */ |
|---|
| 10 | 7 | |
|---|
| 11 | 8 | #include <linux/bitops.h> |
|---|
| .. | .. |
|---|
| 33 | 30 | int ef4_nic_alloc_buffer(struct ef4_nic *efx, struct ef4_buffer *buffer, |
|---|
| 34 | 31 | unsigned int len, gfp_t gfp_flags) |
|---|
| 35 | 32 | { |
|---|
| 36 | | - buffer->addr = dma_zalloc_coherent(&efx->pci_dev->dev, len, |
|---|
| 37 | | - &buffer->dma_addr, gfp_flags); |
|---|
| 33 | + buffer->addr = dma_alloc_coherent(&efx->pci_dev->dev, len, |
|---|
| 34 | + &buffer->dma_addr, gfp_flags); |
|---|
| 38 | 35 | if (!buffer->addr) |
|---|
| 39 | 36 | return -ENOMEM; |
|---|
| 40 | 37 | buffer->len = len; |
|---|