Skip to content

Commit

Permalink
da9052-battery: Add missing platform_set_drvdata
Browse files Browse the repository at this point in the history
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 <axel.lin@gmail.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
  • Loading branch information
Axel Lin authored and Anton Vorontsov committed Mar 26, 2012
1 parent 64eb9b0 commit e1be832
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/power/da9052-battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit e1be832

Please sign in to comment.