[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-id: <003001ce9e54$12595950$370c0bf0$%han@samsung.com>
Date: Wed, 21 Aug 2013 18:51:56 +0900
From: Jingoo Han <jg1.han@...sung.com>
To: 'Vinod Koul' <vinod.koul@...el.com>
Cc: 'Dan Williams' <djbw@...com>, linux-kernel@...r.kernel.org,
'Andy Shevchenko' <andriy.shevchenko@...ux.intel.com>,
'Jingoo Han' <jg1.han@...sung.com>,
'Fabio Estevam' <fabio.estevam@...escale.com>,
'Shawn Guo' <shawn.guo@...aro.org>,
'Jingoo Han' <jg1.han@...sung.com>
Subject: [PATCH] dma: sh: 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@...sung.com>
---
drivers/dma/sh/shdma.c | 3 ---
drivers/dma/sh/sudmac.c | 2 --
2 files changed, 5 deletions(-)
diff --git a/drivers/dma/sh/shdma.c b/drivers/dma/sh/shdma.c
index 211e2f1..208de0f 100644
--- a/drivers/dma/sh/shdma.c
+++ b/drivers/dma/sh/shdma.c
@@ -873,7 +873,6 @@ rst_err:
pm_runtime_put(&pdev->dev);
pm_runtime_disable(&pdev->dev);
- platform_set_drvdata(pdev, NULL);
shdma_cleanup(&shdev->shdma_dev);
eshdma:
if (dmars)
@@ -917,8 +916,6 @@ static int sh_dmae_remove(struct platform_device *pdev)
iounmap(shdev->dmars);
iounmap(shdev->chan_reg);
- platform_set_drvdata(pdev, NULL);
-
synchronize_rcu();
kfree(shdev);
diff --git a/drivers/dma/sh/sudmac.c b/drivers/dma/sh/sudmac.c
index c494417..23fffc8 100644
--- a/drivers/dma/sh/sudmac.c
+++ b/drivers/dma/sh/sudmac.c
@@ -393,7 +393,6 @@ static int sudmac_probe(struct platform_device *pdev)
chan_probe_err:
sudmac_chan_remove(su_dev);
- platform_set_drvdata(pdev, NULL);
shdma_cleanup(&su_dev->shdma_dev);
return err;
@@ -407,7 +406,6 @@ static int sudmac_remove(struct platform_device *pdev)
dma_async_device_unregister(dma_dev);
sudmac_chan_remove(su_dev);
shdma_cleanup(&su_dev->shdma_dev);
- platform_set_drvdata(pdev, NULL);
return 0;
}
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists