Skip to content

Commit

Permalink
iommu/vt-d: Use dev_is_pci() to check whether it is pci device
Browse files Browse the repository at this point in the history
Use PCI standard marco dev_is_pci() instead of directly compare
pci_bus_type to check whether it is pci device.

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Joerg Roedel <joro@8bytes.org>
  • Loading branch information
Yijing Wang authored and Joerg Roedel committed Jan 7, 2014
1 parent d2d1e8f commit dbad086
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/iommu/intel-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -2758,7 +2758,7 @@ static int iommu_no_mapping(struct device *dev)
struct pci_dev *pdev;
int found;

if (unlikely(dev->bus != &pci_bus_type))
if (unlikely(!dev_is_pci(dev)))
return 1;

pdev = to_pci_dev(dev);
Expand Down

0 comments on commit dbad086

Please sign in to comment.