Patchwork [08/26] mtd: maps: ixp4xx: remove unnecessary platform_set_drvdata()

login
register
mail settings
Submitter Jingoo Han
Date May 7, 2013, 6:31 a.m.
Message ID <004c01ce4aec$822652d0$8672f870$@samsung.com>
Download mbox | patch
Permalink /patch/242019/
State Accepted
Commit 55cf4b24ff4e7bc4038201dcb472e55c310a4ca5
Headers show

Comments

Jingoo Han - May 7, 2013, 6:31 a.m.
The driver core clears the driver data to NULL after device_release
or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d
(device-core: Ensure drvdata = NULL when no driver is bound).
Thus, it is not needed to manually clear the device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/mtd/maps/ixp4xx.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
Marc Kleine-Budde - May 7, 2013, 6:49 a.m.
On 05/07/2013 08:31 AM, Jingoo Han wrote:
> The driver core clears the driver data to NULL after device_release
> or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d
> (device-core: Ensure drvdata = NULL when no driver is bound).
> Thus, it is not needed to manually clear the device driver data to NULL.
> 
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Marc Kleine-Budde <mkl@blackshift.org>

Patch

diff --git a/drivers/mtd/maps/ixp4xx.c b/drivers/mtd/maps/ixp4xx.c
index 52b3410..09c542b 100644
--- a/drivers/mtd/maps/ixp4xx.c
+++ b/drivers/mtd/maps/ixp4xx.c
@@ -155,8 +155,6 @@  static int ixp4xx_flash_remove(struct platform_device *dev)
 	struct flash_platform_data *plat = dev->dev.platform_data;
 	struct ixp4xx_flash_info *info = platform_get_drvdata(dev);
 
-	platform_set_drvdata(dev, NULL);
-
 	if(!info)
 		return 0;