aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Fan <van.freenix@gmail.com>2016-07-12 22:13:08 -0400
committerWill Deacon <will.deacon@arm.com>2016-09-16 04:34:12 -0400
commite2d42311ffc9a5014eb129d02eb0e7bc791430f0 (patch)
tree04f41a7b7e5fcd9d551a586ec6249ee25338c7fd
parent3eab887a55424fc2c27553b7bfe32330df83f7b8 (diff)
iommu/arm-smmu: Drop devm_free_irq when driver detach
There is no need to call devm_free_irq when driver detach. devres_release_all which is called after 'drv->remove' will release all managed resources. Signed-off-by: Peng Fan <van.freenix@gmail.com> Reviewed-by: Robin Murphy <robin.murphy@arm.com> Cc: Will Deacon <will.deacon@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
-rw-r--r--drivers/iommu/arm-smmu.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
index 2db74ebc3240..069b2ea89113 100644
--- a/drivers/iommu/arm-smmu.c
+++ b/drivers/iommu/arm-smmu.c
@@ -1998,7 +1998,6 @@ out_put_masters:
1998 1998
1999static int arm_smmu_device_remove(struct platform_device *pdev) 1999static int arm_smmu_device_remove(struct platform_device *pdev)
2000{ 2000{
2001 int i;
2002 struct device *dev = &pdev->dev; 2001 struct device *dev = &pdev->dev;
2003 struct arm_smmu_device *curr, *smmu = NULL; 2002 struct arm_smmu_device *curr, *smmu = NULL;
2004 struct rb_node *node; 2003 struct rb_node *node;
@@ -2025,9 +2024,6 @@ static int arm_smmu_device_remove(struct platform_device *pdev)
2025 if (!bitmap_empty(smmu->context_map, ARM_SMMU_MAX_CBS)) 2024 if (!bitmap_empty(smmu->context_map, ARM_SMMU_MAX_CBS))
2026 dev_err(dev, "removing device with active domains!\n"); 2025 dev_err(dev, "removing device with active domains!\n");
2027 2026
2028 for (i = 0; i < smmu->num_global_irqs; ++i)
2029 devm_free_irq(smmu->dev, smmu->irqs[i], smmu);
2030
2031 /* Turn the thing off */ 2027 /* Turn the thing off */
2032 writel(sCR0_CLIENTPD, ARM_SMMU_GR0_NS(smmu) + ARM_SMMU_GR0_sCR0); 2028 writel(sCR0_CLIENTPD, ARM_SMMU_GR0_NS(smmu) + ARM_SMMU_GR0_sCR0);
2033 return 0; 2029 return 0;