Skip to content

Commit

Permalink
iommu/amd: 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 d6e0a2d commit b82a227
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/iommu/amd_iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b82a227

Please sign in to comment.