summaryrefslogtreecommitdiffstats
path: root/drivers/iommu/sprd-iommu.c
diff options
context:
space:
mode:
authorRobin Murphy <robin.murphy@arm.com>2022-06-21 16:14:27 +0100
committerJoerg Roedel <jroedel@suse.de>2022-07-06 12:55:53 +0200
commit4d26ba671e3deed010311345e4426e6e11eaaf4c (patch)
tree4bbef47511c6955e24595aac837dc5b12d63dbec /drivers/iommu/sprd-iommu.c
parentb321a2fba2734cbac799034081e20dcdb321ef4f (diff)
downloadlinux-4d26ba671e3deed010311345e4426e6e11eaaf4c.tar.gz
linux-4d26ba671e3deed010311345e4426e6e11eaaf4c.tar.bz2
linux-4d26ba671e3deed010311345e4426e6e11eaaf4c.zip
iommu: Clean up release_device checks
Since .release_device is now called through per-device ops, any call which gets as far as a driver definitely *is* for that driver, for a device which has successfully passed .probe_device, so all the checks to that effect are now redundant and can be removed. In the same vein we can also skip freeing fwspecs which are now managed by core code. Signed-off-by: Robin Murphy <robin.murphy@arm.com> Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com> Link: https://lore.kernel.org/r/02671dbfad7a3343fc25a44222350efcb455fe3c.1655822151.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/sprd-iommu.c')
-rw-r--r--drivers/iommu/sprd-iommu.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/drivers/iommu/sprd-iommu.c b/drivers/iommu/sprd-iommu.c
index bd409bab6286..511959c8a14d 100644
--- a/drivers/iommu/sprd-iommu.c
+++ b/drivers/iommu/sprd-iommu.c
@@ -383,16 +383,6 @@ static struct iommu_device *sprd_iommu_probe_device(struct device *dev)
return &sdev->iommu;
}
-static void sprd_iommu_release_device(struct device *dev)
-{
- struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(dev);
-
- if (!fwspec || fwspec->ops != &sprd_iommu_ops)
- return;
-
- iommu_fwspec_free(dev);
-}
-
static struct iommu_group *sprd_iommu_device_group(struct device *dev)
{
struct sprd_iommu_device *sdev = dev_iommu_priv_get(dev);
@@ -417,7 +407,6 @@ static int sprd_iommu_of_xlate(struct device *dev, struct of_phandle_args *args)
static const struct iommu_ops sprd_iommu_ops = {
.domain_alloc = sprd_iommu_domain_alloc,
.probe_device = sprd_iommu_probe_device,
- .release_device = sprd_iommu_release_device,
.device_group = sprd_iommu_device_group,
.of_xlate = sprd_iommu_of_xlate,
.pgsize_bitmap = ~0UL << SPRD_IOMMU_PAGE_SHIFT,