From e1be8329991b708adbb4e767bcfd6ad1f92bae65 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Wed, 11 Jan 2012 15:43:44 +0800 Subject: [PATCH] da9052-battery: Add missing platform_set_drvdata Add missing platform_set_drvdata in da9052_bat_probe. Otherwise, calling platform_get_drvdata in da9052_bat_remove returns NULL. Signed-off-by: Axel Lin Signed-off-by: Anton Vorontsov --- drivers/power/da9052-battery.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/power/da9052-battery.c b/drivers/power/da9052-battery.c index e8ea47a53dee..07d5b36535d5 100644 --- a/drivers/power/da9052-battery.c +++ b/drivers/power/da9052-battery.c @@ -612,6 +612,7 @@ static s32 __devinit da9052_bat_probe(struct platform_device *pdev) if (ret) goto err; + platform_set_drvdata(pdev, bat); return 0; err: -- 2.34.1