1
0
Fork 0

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

Use dev_is_pci() instead of checking bus type directly.

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
hifive-unleashed-5.1
Yijing Wang 2013-12-11 14:00:26 +08:00 committed by David S. Miller
parent 1de425c7b2
commit bf70053c5d
2 changed files with 3 additions and 4 deletions

View File

@ -854,7 +854,7 @@ int dma_supported(struct device *dev, u64 device_mask)
return 1;
#ifdef CONFIG_PCI
if (dev->bus == &pci_bus_type)
if (dev_is_pci(dev))
return pci64_dma_supported(to_pci_dev(dev), device_mask);
#endif

View File

@ -666,10 +666,9 @@ EXPORT_SYMBOL(dma_ops);
*/
int dma_supported(struct device *dev, u64 mask)
{
#ifdef CONFIG_PCI
if (dev->bus == &pci_bus_type)
if (dev_is_pci(dev))
return 1;
#endif
return 0;
}
EXPORT_SYMBOL(dma_supported);