Commit b3eb76d17570bd17d280e5d7deb8aad6b6d83d8a
Committed by
Joerg Roedel
1 parent
d6e0a2dd12
Exists in
master
and in
16 other branches
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: Yijing Wang <wangyijing@huawei.com> Acked-by: Varun Sethi <varun.sethi@freescale.com> Signed-off-by: Joerg Roedel <joro@8bytes.org>
Showing 1 changed file with 3 additions and 3 deletions Side-by-side Diff
drivers/iommu/fsl_pamu_domain.c
... | ... | @@ -691,7 +691,7 @@ |
691 | 691 | * Use LIODN of the PCI controller while attaching a |
692 | 692 | * PCI device. |
693 | 693 | */ |
694 | - if (dev->bus == &pci_bus_type) { | |
694 | + if (dev_is_pci(dev)) { | |
695 | 695 | pdev = to_pci_dev(dev); |
696 | 696 | pci_ctl = pci_bus_to_host(pdev->bus); |
697 | 697 | /* |
... | ... | @@ -729,7 +729,7 @@ |
729 | 729 | * Use LIODN of the PCI controller while detaching a |
730 | 730 | * PCI device. |
731 | 731 | */ |
732 | - if (dev->bus == &pci_bus_type) { | |
732 | + if (dev_is_pci(dev)) { | |
733 | 733 | pdev = to_pci_dev(dev); |
734 | 734 | pci_ctl = pci_bus_to_host(pdev->bus); |
735 | 735 | /* |
... | ... | @@ -1056,7 +1056,7 @@ |
1056 | 1056 | * For platform devices we allocate a separate group for |
1057 | 1057 | * each of the devices. |
1058 | 1058 | */ |
1059 | - if (dev->bus == &pci_bus_type) { | |
1059 | + if (dev_is_pci(dev)) { | |
1060 | 1060 | pdev = to_pci_dev(dev); |
1061 | 1061 | /* Don't create device groups for virtual PCI bridges */ |
1062 | 1062 | if (pdev->subordinate) |