* [PATCH 3/8] ab8500_bm: remove unnecessary platform_set_drvdata()
@ 2013-05-06 4:20 Jingoo Han
2013-05-07 8:15 ` Lee Jones
0 siblings, 1 reply; 2+ messages in thread
From: Jingoo Han @ 2013-05-06 4:20 UTC (permalink / raw)
To: 'Anton Vorontsov'
Cc: 'David Woodhouse', linux-kernel, 'Hongbo Zhang',
'Marcus Cooper', Lee Jones
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/power/ab8500_btemp.c | 1 -
drivers/power/ab8500_charger.c | 2 --
drivers/power/ab8500_fg.c | 1 -
drivers/power/abx500_chargalg.c | 1 -
4 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/drivers/power/ab8500_btemp.c b/drivers/power/ab8500_btemp.c
index d412d34..7f9a454 100644
--- a/drivers/power/ab8500_btemp.c
+++ b/drivers/power/ab8500_btemp.c
@@ -1045,7 +1045,6 @@ static int ab8500_btemp_remove(struct platform_device *pdev)
flush_scheduled_work();
power_supply_unregister(&di->btemp_psy);
- platform_set_drvdata(pdev, NULL);
return 0;
}
diff --git a/drivers/power/ab8500_charger.c b/drivers/power/ab8500_charger.c
index a558318..f098fda 100644
--- a/drivers/power/ab8500_charger.c
+++ b/drivers/power/ab8500_charger.c
@@ -3425,8 +3425,6 @@ static int ab8500_charger_remove(struct platform_device *pdev)
if (di->ac_chg.enabled && !di->ac_chg.external)
power_supply_unregister(&di->ac_chg.psy);
- platform_set_drvdata(pdev, NULL);
-
return 0;
}
diff --git a/drivers/power/ab8500_fg.c b/drivers/power/ab8500_fg.c
index c5391f5..1263638 100644
--- a/drivers/power/ab8500_fg.c
+++ b/drivers/power/ab8500_fg.c
@@ -3070,7 +3070,6 @@ static int ab8500_fg_remove(struct platform_device *pdev)
flush_scheduled_work();
ab8500_fg_sysfs_psy_remove_attrs(di->fg_psy.dev);
power_supply_unregister(&di->fg_psy);
- platform_set_drvdata(pdev, NULL);
return ret;
}
diff --git a/drivers/power/abx500_chargalg.c b/drivers/power/abx500_chargalg.c
index 9863e42..6d27236 100644
--- a/drivers/power/abx500_chargalg.c
+++ b/drivers/power/abx500_chargalg.c
@@ -2035,7 +2035,6 @@ static int abx500_chargalg_remove(struct platform_device *pdev)
destroy_workqueue(di->chargalg_wq);
power_supply_unregister(&di->chargalg_psy);
- platform_set_drvdata(pdev, NULL);
return 0;
}
--
1.7.2.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 3/8] ab8500_bm: remove unnecessary platform_set_drvdata()
2013-05-06 4:20 [PATCH 3/8] ab8500_bm: remove unnecessary platform_set_drvdata() Jingoo Han
@ 2013-05-07 8:15 ` Lee Jones
0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2013-05-07 8:15 UTC (permalink / raw)
To: Jingoo Han
Cc: 'Anton Vorontsov', 'David Woodhouse',
linux-kernel, 'Hongbo Zhang', 'Marcus Cooper'
On Mon, 06 May 2013, 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>
> ---
> drivers/power/ab8500_btemp.c | 1 -
> drivers/power/ab8500_charger.c | 2 --
> drivers/power/ab8500_fg.c | 1 -
> drivers/power/abx500_chargalg.c | 1 -
> 4 files changed, 0 insertions(+), 5 deletions(-)
Acked-by: Lee Jones <lee.jones@linaro.org>
--
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-05-07 8:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-06 4:20 [PATCH 3/8] ab8500_bm: remove unnecessary platform_set_drvdata() Jingoo Han
2013-05-07 8:15 ` Lee Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox