diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2013-06-26 18:49:11 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2013-09-21 16:02:03 -0400 |
commit | 4c15c243189d01509943e70896d575a2a69c3269 (patch) | |
tree | 374bb70cd0a3a6611d213834991c6ff397689692 /drivers/net/ethernet | |
parent | 1bfa2c40ced07bae83839840be5143a7b09af714 (diff) |
DMA-API: net: emulex/benet: 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/emulex/benet/be_main.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c index 3224d28cdad4..208415107418 100644 --- a/drivers/net/ethernet/emulex/benet/be_main.c +++ b/drivers/net/ethernet/emulex/benet/be_main.c | |||
@@ -4335,19 +4335,11 @@ static int be_probe(struct pci_dev *pdev, const struct pci_device_id *pdev_id) | |||
4335 | adapter->netdev = netdev; | 4335 | adapter->netdev = netdev; |
4336 | SET_NETDEV_DEV(netdev, &pdev->dev); | 4336 | SET_NETDEV_DEV(netdev, &pdev->dev); |
4337 | 4337 | ||
4338 | status = dma_set_mask(&pdev->dev, DMA_BIT_MASK(64)); | 4338 | status = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64)); |
4339 | if (!status) { | 4339 | if (!status) { |
4340 | status = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(64)); | ||
4341 | if (status < 0) { | ||
4342 | dev_err(&pdev->dev, "dma_set_coherent_mask failed\n"); | ||
4343 | goto free_netdev; | ||
4344 | } | ||
4345 | netdev->features |= NETIF_F_HIGHDMA; | 4340 | netdev->features |= NETIF_F_HIGHDMA; |
4346 | } else { | 4341 | } else { |
4347 | status = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32)); | 4342 | status = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); |
4348 | if (!status) | ||
4349 | status = dma_set_coherent_mask(&pdev->dev, | ||
4350 | DMA_BIT_MASK(32)); | ||
4351 | if (status) { | 4343 | if (status) { |
4352 | dev_err(&pdev->dev, "Could not set PCI DMA Mask\n"); | 4344 | dev_err(&pdev->dev, "Could not set PCI DMA Mask\n"); |
4353 | goto free_netdev; | 4345 | goto free_netdev; |