diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2013-06-26 15:02:30 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2013-09-21 16:02:00 -0400 |
commit | 1bfa2c40ced07bae83839840be5143a7b09af714 (patch) | |
tree | df487e29ea73dd2eca5c230d00675de65b50f0ae /drivers/net/ethernet | |
parent | 4011f9f76683b7f30965c960ea45500acc200880 (diff) |
DMA-API: net: broadcom/bnx2x: replace dma_set_mask()+dma_set_coherent_mask() with new helper
Replace the following sequence:
dma_set_mask(dev, mask);
dma_set_coherent_mask(dev, mask);
with a call to the new helper dma_set_mask_and_coherent().
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c index 2f8dbbbd7a86..e6c3e663f6c0 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | |||
@@ -12072,13 +12072,9 @@ static int bnx2x_set_coherency_mask(struct bnx2x *bp) | |||
12072 | { | 12072 | { |
12073 | struct device *dev = &bp->pdev->dev; | 12073 | struct device *dev = &bp->pdev->dev; |
12074 | 12074 | ||
12075 | if (dma_set_mask(dev, DMA_BIT_MASK(64)) == 0) { | 12075 | if (dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64)) == 0) { |
12076 | bp->flags |= USING_DAC_FLAG; | 12076 | bp->flags |= USING_DAC_FLAG; |
12077 | if (dma_set_coherent_mask(dev, DMA_BIT_MASK(64)) != 0) { | 12077 | } else if (dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32)) != 0) { |
12078 | dev_err(dev, "dma_set_coherent_mask failed, aborting\n"); | ||
12079 | return -EIO; | ||
12080 | } | ||
12081 | } else if (dma_set_mask(dev, DMA_BIT_MASK(32)) != 0) { | ||
12082 | dev_err(dev, "System does not support DMA, aborting\n"); | 12078 | dev_err(dev, "System does not support DMA, aborting\n"); |
12083 | return -EIO; | 12079 | return -EIO; |
12084 | } | 12080 | } |