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:25 -0400 |
commit | e22f0e3fdc2b5b3a399df29c3b5991e35b690320 (patch) | |
tree | 587e0b3ad6712599385bd2d5727d89a604e9c9a8 | |
parent | 052d0efada8ccfccd924059b75f5fb119cd10f9a (diff) |
DMA-API: staging: et131x: 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>
-rw-r--r-- | drivers/staging/et131x/et131x.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index f73e58f5ef8d..61da7ee36e45 100644 --- a/drivers/staging/et131x/et131x.c +++ b/drivers/staging/et131x/et131x.c | |||
@@ -4797,21 +4797,8 @@ static int et131x_pci_setup(struct pci_dev *pdev, | |||
4797 | pci_set_master(pdev); | 4797 | pci_set_master(pdev); |
4798 | 4798 | ||
4799 | /* Check the DMA addressing support of this device */ | 4799 | /* Check the DMA addressing support of this device */ |
4800 | if (!dma_set_mask(&pdev->dev, DMA_BIT_MASK(64))) { | 4800 | if (dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64)) && |
4801 | rc = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(64)); | 4801 | dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32))) { |
4802 | if (rc < 0) { | ||
4803 | dev_err(&pdev->dev, | ||
4804 | "Unable to obtain 64 bit DMA for consistent allocations\n"); | ||
4805 | goto err_release_res; | ||
4806 | } | ||
4807 | } else if (!dma_set_mask(&pdev->dev, DMA_BIT_MASK(32))) { | ||
4808 | rc = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32)); | ||
4809 | if (rc < 0) { | ||
4810 | dev_err(&pdev->dev, | ||
4811 | "Unable to obtain 32 bit DMA for consistent allocations\n"); | ||
4812 | goto err_release_res; | ||
4813 | } | ||
4814 | } else { | ||
4815 | dev_err(&pdev->dev, "No usable DMA addressing method\n"); | 4802 | dev_err(&pdev->dev, "No usable DMA addressing method\n"); |
4816 | rc = -EIO; | 4803 | rc = -EIO; |
4817 | goto err_release_res; | 4804 | goto err_release_res; |