* [PATCH] power_supply: tps65217-charger: fix missing platform_set_drvdata()
@ 2016-07-26 14:49 Wei Yongjun
2016-08-15 21:11 ` Sebastian Reichel
0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2016-07-26 14:49 UTC (permalink / raw)
To: Sebastian Reichel, Dmitry Eremin-Solenikov, David Woodhouse
Cc: Wei Yongjun, linux-pm
Add missing platform_set_drvdata() in tps65217_charger_probe(), otherwise
calling platform_get_drvdata() in remove returns NULL.
This is detected by Coccinelle semantic patch.
Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com>
---
drivers/power/tps65217_charger.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/power/tps65217_charger.c b/drivers/power/tps65217_charger.c
index 73dfae4..4c56e54 100644
--- a/drivers/power/tps65217_charger.c
+++ b/drivers/power/tps65217_charger.c
@@ -206,6 +206,7 @@ static int tps65217_charger_probe(struct platform_device *pdev)
if (!charger)
return -ENOMEM;
+ platform_set_drvdata(pdev, charger);
charger->tps = tps;
charger->dev = &pdev->dev;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] power_supply: tps65217-charger: fix missing platform_set_drvdata()
2016-07-26 14:49 [PATCH] power_supply: tps65217-charger: fix missing platform_set_drvdata() Wei Yongjun
@ 2016-08-15 21:11 ` Sebastian Reichel
0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Reichel @ 2016-08-15 21:11 UTC (permalink / raw)
To: Wei Yongjun; +Cc: Dmitry Eremin-Solenikov, David Woodhouse, linux-pm
[-- Attachment #1: Type: text/plain, Size: 382 bytes --]
Hi,
On Tue, Jul 26, 2016 at 02:49:04PM +0000, Wei Yongjun wrote:
> Add missing platform_set_drvdata() in tps65217_charger_probe(), otherwise
> calling platform_get_drvdata() in remove returns NULL.
>
> This is detected by Coccinelle semantic patch.
>
> Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com>
Thanks, queued into power-supply's -fixes branch.
-- Sebastian
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-08-15 21:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-26 14:49 [PATCH] power_supply: tps65217-charger: fix missing platform_set_drvdata() Wei Yongjun
2016-08-15 21:11 ` Sebastian Reichel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).