aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iommu
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-09-11 17:19:43 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-09-11 18:56:24 -0400
commit5e42781caf6f5f1c77e842d6dcbbf5c51b8b2c29 (patch)
tree958046b2a936728f8726a4b862850b5ad650db10 /drivers/iommu
parentffd29195ed720188789a6c7ada5e212b9c59e1af (diff)
drivers/iommu: remove unnecessary platform_set_drvdata()
The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Cc: David Brown <davidb@codeaurora.org> Cc: Stephen Boyd <sboyd@codeaurora.org> Cc: Joerg Roedel <joro@8bytes.org> Cc: Suman Anna <s-anna@ti.com> Acked-by: Libo Chen <libo.chen@huawei.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/iommu')
-rw-r--r--drivers/iommu/msm_iommu_dev.c2
-rw-r--r--drivers/iommu/omap-iommu.c2
2 files changed, 0 insertions, 4 deletions
diff --git a/drivers/iommu/msm_iommu_dev.c b/drivers/iommu/msm_iommu_dev.c
index 0a1c9626aa9e..08ba4972da9d 100644
--- a/drivers/iommu/msm_iommu_dev.c
+++ b/drivers/iommu/msm_iommu_dev.c
@@ -282,7 +282,6 @@ static int msm_iommu_remove(struct platform_device *pdev)
282 clk_put(drv->pclk); 282 clk_put(drv->pclk);
283 memset(drv, 0, sizeof(*drv)); 283 memset(drv, 0, sizeof(*drv));
284 kfree(drv); 284 kfree(drv);
285 platform_set_drvdata(pdev, NULL);
286 } 285 }
287 return 0; 286 return 0;
288} 287}
@@ -366,7 +365,6 @@ static int msm_iommu_ctx_remove(struct platform_device *pdev)
366 if (drv) { 365 if (drv) {
367 memset(drv, 0, sizeof(struct msm_iommu_ctx_drvdata)); 366 memset(drv, 0, sizeof(struct msm_iommu_ctx_drvdata));
368 kfree(drv); 367 kfree(drv);
369 platform_set_drvdata(pdev, NULL);
370 } 368 }
371 return 0; 369 return 0;
372} 370}
diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c
index 0ba3766240d5..bcd78a720630 100644
--- a/drivers/iommu/omap-iommu.c
+++ b/drivers/iommu/omap-iommu.c
@@ -1008,8 +1008,6 @@ static int omap_iommu_remove(struct platform_device *pdev)
1008 struct resource *res; 1008 struct resource *res;
1009 struct omap_iommu *obj = platform_get_drvdata(pdev); 1009 struct omap_iommu *obj = platform_get_drvdata(pdev);
1010 1010
1011 platform_set_drvdata(pdev, NULL);
1012
1013 iopgtable_clear_entry_all(obj); 1011 iopgtable_clear_entry_all(obj);
1014 1012
1015 irq = platform_get_irq(pdev, 0); 1013 irq = platform_get_irq(pdev, 0);