Skip to contentSkip to conversation

iommu/amd: Use dev_is_pci() to check whether it is pci device

PATCH In review Yijing Wang 1 participant 1 message Dec 5, 2013 IOMMU

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 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.

---
 drivers/iommu/amd_iommu.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/iommu/amd_iommu.c +2 -2
index 72531f0..faf0da4 100644
@@ -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);
Signature · 1 line
1.7.1