aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/pci.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index b2d23d1b0d41..929fd3932032 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -2315,12 +2315,11 @@ pci_set_dma_mask(struct pci_dev *dev, u64 mask)
2315int 2315int
2316pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask) 2316pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask)
2317{ 2317{
2318 if (!pci_dma_supported(dev, mask)) 2318 int ret = dma_set_coherent_mask(&dev->dev, mask);
2319 return -EIO; 2319 if (ret)
2320 return ret;
2320 2321
2321 dev->dev.coherent_dma_mask = mask;
2322 dev_dbg(&dev->dev, "using %dbit consistent DMA mask\n", fls64(mask)); 2322 dev_dbg(&dev->dev, "using %dbit consistent DMA mask\n", fls64(mask));
2323
2324 return 0; 2323 return 0;
2325} 2324}
2326#endif 2325#endif