iommu/fsl_pamu: Use dev_is_pci() to check whether it is pci device
PATCH 2/3 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.
--- drivers/iommu/fsl_pamu_domain.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/iommu/fsl_pamu_domain.c +3 -3
@@ -691,7 +691,7 @@ static int fsl_pamu_attach_device(struct iommu_domain *domain,* Use LIODN of the PCI controller while attaching a * PCI device. */ -if (dev->bus == &pci_bus_type) { +if (dev_is_pci (dev)) { pdev =to_pci_dev (dev); pci_ctl =pci_bus_to_host (pdev->bus);/*
@@ -729,7 +729,7 @@ static void fsl_pamu_detach_device(struct iommu_domain *domain,* Use LIODN of the PCI controller while detaching a * PCI device. */ -if (dev->bus == &pci_bus_type) { +if (dev_is_pci (dev)) { pdev =to_pci_dev (dev); pci_ctl =pci_bus_to_host (pdev->bus);/*
@@ -1056,7 +1056,7 @@ static int fsl_pamu_add_device(struct device *dev)* For platform devices we allocate a separate group for * each of the devices. */ -if (dev->bus == &pci_bus_type) { +if (dev_is_pci (dev)) { pdev =to_pci_dev (dev);/* Don't create device groups for virtual PCI bridges */ if (pdev->subordinate)
Signature · 1 line
1.7.1
Quoted 54 lines
-----Original Message-----
From: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org [mailto:iommu- bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org] On Behalf Of Yijing Wang
Sent: Thursday, December 05, 2013 5:13 PM
To: Alex Williamson; Joerg Roedel
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org; [email protected]; Hanjun Guo
Subject: [PATCH 2/3] iommu/fsl_pamu: Usedev_is_pci()to check whether it
is pci deviceUse PCI standard marco
dev_is_pci()instead of directly comparepci_bus_typeto check whether it is pci device.Signed-off-by Yijing Wang <[email protected]>--- drivers/iommu/fsl_pamu_domain.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)(quoted diff) +0
-0
b/drivers/iommu/fsl_pamu_domain.cindex c857c30..93072ba 100644drivers/iommu/fsl_pamu_domain.c +1
-1@@ -691,7 +691,7 @@ static int fsl_pamu_attach_device(struct iommu_domain*domain, * Use LIODN of the PCI controller while attaching a * PCI device. */ -if (dev->bus == &pci_bus_type) { +if (dev_is_pci (dev)) { pdev =to_pci_dev (dev); pci_ctl =pci_bus_to_host (pdev->bus);drivers/iommu/fsl_pamu_domain.c +1
-1/* @@ -729,7 +729,7 @@ static void fsl_pamu_detach_device(structiommu_domain *domain, * Use LIODN of the PCI controller while detaching a * PCI device. */ -if (dev->bus == &pci_bus_type) { +if (dev_is_pci (dev)) { pdev =to_pci_dev (dev); pci_ctl =pci_bus_to_host (pdev->bus);drivers/iommu/fsl_pamu_domain.c +1
-2/* @@ -1056,7 +1056,7 @@ static int fsl_pamu_add_device(struct device *dev)* For platform devices we allocate a separate group for * each of the devices. */ -if (dev->bus == &pci_bus_type) { +if (dev_is_pci (dev)) { pdev =to_pci_dev (dev);/* Don't create device groups for virtual PCI bridges */ if (pdev->subordinate) --
Quoted 1 line
1.7.1