From: Yijing Wang Date: Thu, 5 Dec 2013 11:42:41 +0000 (+0800) Subject: iommu/amd: Use dev_is_pci() to check whether it is pci device X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=b82a2272b37af1f1f86ee6e5966ad941f9db5dc7;p=deliverable%2Flinux.git iommu/amd: Use dev_is_pci() to check whether it is pci device 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 Signed-off-by: Joerg Roedel --- diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index 72531f008a5e..faf0da4bb3a2 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -248,8 +248,8 @@ static bool check_device(struct device *dev) if (!dev || !dev->dma_mask) return false; - /* No device or no PCI device */ - if (dev->bus != &pci_bus_type) + /* No PCI device */ + if (!dev_is_pci(dev)) return false; devid = get_device_id(dev);