Skip to content

Commit

Permalink
sparc/PCI: Use dev_is_pci() to identify PCI devices
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yijing Wang authored and David S. Miller committed Jan 5, 2014
1 parent 1de425c commit bf70053
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion arch/sparc/kernel/iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 2 additions & 3 deletions arch/sparc/kernel/ioport.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit bf70053

Please sign in to comment.