Commit bf70053c authored by Yijing Wang's avatar Yijing Wang Committed by David S. Miller

sparc/PCI: Use dev_is_pci() to identify PCI devices

Use dev_is_pci() instead of checking bus type directly.
Signed-off-by: default avatarYijing Wang <wangyijing@huawei.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1de425c7
...@@ -854,7 +854,7 @@ int dma_supported(struct device *dev, u64 device_mask) ...@@ -854,7 +854,7 @@ int dma_supported(struct device *dev, u64 device_mask)
return 1; return 1;
#ifdef CONFIG_PCI #ifdef CONFIG_PCI
if (dev->bus == &pci_bus_type) if (dev_is_pci(dev))
return pci64_dma_supported(to_pci_dev(dev), device_mask); return pci64_dma_supported(to_pci_dev(dev), device_mask);
#endif #endif
......
...@@ -666,10 +666,9 @@ EXPORT_SYMBOL(dma_ops); ...@@ -666,10 +666,9 @@ EXPORT_SYMBOL(dma_ops);
*/ */
int dma_supported(struct device *dev, u64 mask) int dma_supported(struct device *dev, u64 mask)
{ {
#ifdef CONFIG_PCI if (dev_is_pci(dev))
if (dev->bus == &pci_bus_type)
return 1; return 1;
#endif
return 0; return 0;
} }
EXPORT_SYMBOL(dma_supported); EXPORT_SYMBOL(dma_supported);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment