提交 b3eb76d1 编写于 作者: Y Yijing Wang 提交者: Joerg Roedel

iommu/fsl_pamu: 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: NYijing Wang <wangyijing@huawei.com>
Acked-by: NVarun Sethi <varun.sethi@freescale.com>
Signed-off-by: NJoerg Roedel <joro@8bytes.org>
上级 d6e0a2dd
...@@ -691,7 +691,7 @@ static int fsl_pamu_attach_device(struct iommu_domain *domain, ...@@ -691,7 +691,7 @@ static int fsl_pamu_attach_device(struct iommu_domain *domain,
* Use LIODN of the PCI controller while attaching a * Use LIODN of the PCI controller while attaching a
* PCI device. * PCI device.
*/ */
if (dev->bus == &pci_bus_type) { if (dev_is_pci(dev)) {
pdev = to_pci_dev(dev); pdev = to_pci_dev(dev);
pci_ctl = pci_bus_to_host(pdev->bus); pci_ctl = pci_bus_to_host(pdev->bus);
/* /*
...@@ -729,7 +729,7 @@ static void fsl_pamu_detach_device(struct iommu_domain *domain, ...@@ -729,7 +729,7 @@ static void fsl_pamu_detach_device(struct iommu_domain *domain,
* Use LIODN of the PCI controller while detaching a * Use LIODN of the PCI controller while detaching a
* PCI device. * PCI device.
*/ */
if (dev->bus == &pci_bus_type) { if (dev_is_pci(dev)) {
pdev = to_pci_dev(dev); pdev = to_pci_dev(dev);
pci_ctl = pci_bus_to_host(pdev->bus); pci_ctl = pci_bus_to_host(pdev->bus);
/* /*
...@@ -1056,7 +1056,7 @@ static int fsl_pamu_add_device(struct device *dev) ...@@ -1056,7 +1056,7 @@ static int fsl_pamu_add_device(struct device *dev)
* For platform devices we allocate a separate group for * For platform devices we allocate a separate group for
* each of the devices. * each of the devices.
*/ */
if (dev->bus == &pci_bus_type) { if (dev_is_pci(dev)) {
pdev = to_pci_dev(dev); pdev = to_pci_dev(dev);
/* Don't create device groups for virtual PCI bridges */ /* Don't create device groups for virtual PCI bridges */
if (pdev->subordinate) if (pdev->subordinate)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册