[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1386243761-27400-1-git-send-email-wangyijing@huawei.com>
Date: Thu, 5 Dec 2013 19:42:41 +0800
From: Yijing Wang <wangyijing@...wei.com>
To: Alex Williamson <alex.williamson@...hat.com>,
Joerg Roedel <joro@...tes.org>
CC: <iommu@...ts.linux-foundation.org>, <linux-kernel@...r.kernel.org>,
Yijing Wang <wangyijing@...wei.com>,
Hanjun Guo <guohanjun@...wei.com>
Subject: [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.
Signed-off-by: Yijing Wang <wangyijing@...wei.com>
---
drivers/iommu/amd_iommu.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index 72531f0..faf0da4 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);
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists