summaryrefslogtreecommitdiffstats
path: root/drivers/iommu/iommu.c
diff options
context:
space:
mode:
authorRobin Murphy <robin.murphy@arm.com>2022-08-15 17:20:17 +0100
committerJoerg Roedel <jroedel@suse.de>2022-09-07 14:26:17 +0200
commit29e932295bfaba792d29e66e8be0637ff3994724 (patch)
tree292e5813ae7780764bfeb890312c20e828cf7b3e /drivers/iommu/iommu.c
parent19d3607c74bc0332f0ee3a2d54ead6e792c0dce9 (diff)
downloadlinux-29e932295bfaba792d29e66e8be0637ff3994724.tar.bz2
iommu: Clean up bus_set_iommu()
Clean up the remaining trivial bus_set_iommu() callsites along with the implementation. Now drivers only have to know and care about iommu_device instances, phew! Reviewed-by: Kevin Tian <kevin.tian@intel.com> Tested-by: Matthew Rosato <mjrosato@linux.ibm.com> # s390 Tested-by: Niklas Schnelle <schnelle@linux.ibm.com> # s390 Signed-off-by: Robin Murphy <robin.murphy@arm.com> Link: https://lore.kernel.org/r/ea383d5f4d74ffe200ab61248e5de6e95846180a.1660572783.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/iommu.c')
-rw-r--r--drivers/iommu/iommu.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index 422d4e9f980b..83688db121f0 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -1826,30 +1826,6 @@ int bus_iommu_probe(struct bus_type *bus)
return ret;
}
-/**
- * bus_set_iommu - set iommu-callbacks for the bus
- * @bus: bus.
- * @ops: the callbacks provided by the iommu-driver
- *
- * This function is called by an iommu driver to set the iommu methods
- * used for a particular bus. Drivers for devices on that bus can use
- * the iommu-api after these ops are registered.
- * This special function is needed because IOMMUs are usually devices on
- * the bus itself, so the iommu drivers are not initialized when the bus
- * is set up. With this function the iommu-driver can set the iommu-ops
- * afterwards.
- */
-int bus_set_iommu(struct bus_type *bus, const struct iommu_ops *ops)
-{
- if (bus->iommu_ops && ops && bus->iommu_ops != ops)
- return -EBUSY;
-
- bus->iommu_ops = ops;
-
- return 0;
-}
-EXPORT_SYMBOL_GPL(bus_set_iommu);
-
bool iommu_present(struct bus_type *bus)
{
return bus->iommu_ops != NULL;