提交 bf70053c 编写于 作者: Y Yijing Wang 提交者: 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: NYijing Wang <wangyijing@huawei.com>
Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 1de425c7
......@@ -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
......
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册