aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2011-09-06 12:46:34 -0400
committerJoerg Roedel <joerg.roedel@amd.com>2011-10-21 08:37:20 -0400
commita1b60c1cd913c5ccfb38c717ba0bd22622425fa7 (patch)
tree74e5c1e847262ba3c42fb3b0396a3e781c168b6e /drivers
parent905d66c1e5dc8149e111f04a32bb193f25da1d53 (diff)
iommu/core: Convert iommu_found to iommu_present
With per-bus iommu_ops the iommu_found function needs to work on a bus_type too. This patch adds a bus_type parameter to that function and converts all call-places. The function is also renamed to iommu_present because the function now checks if an iommu is present for a given bus and does not check for a global iommu anymore. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/iommu/iommu.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index 46e1c24f2f43..ad8ce1addb4d 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -66,11 +66,14 @@ int bus_set_iommu(struct bus_type *bus, struct iommu_ops *ops)
66} 66}
67EXPORT_SYMBOL_GPL(bus_set_iommu); 67EXPORT_SYMBOL_GPL(bus_set_iommu);
68 68
69bool iommu_found(void) 69bool iommu_present(struct bus_type *bus)
70{ 70{
71 return iommu_ops != NULL; 71 if (bus->iommu_ops != NULL)
72 return true;
73 else
74 return iommu_ops != NULL;
72} 75}
73EXPORT_SYMBOL_GPL(iommu_found); 76EXPORT_SYMBOL_GPL(iommu_present);
74 77
75struct iommu_domain *iommu_domain_alloc(struct bus_type *bus) 78struct iommu_domain *iommu_domain_alloc(struct bus_type *bus)
76{ 79{