summaryrefslogtreecommitdiff
path: root/drivers/regulator
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-08-18 10:33:05 +0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-08-28 22:00:29 +0400
commit0764ef59161a4026c44ca184b7812383feabb769 (patch)
tree6ce5f9d3f09732b861c7d31dfdf8719a781952de /drivers/regulator
parent7305608bc888271786e38aa27e63f846367ae842 (diff)
downloadlinux-0764ef59161a4026c44ca184b7812383feabb769.tar.xz
regulator: max8907: Properly set pmic pointer in max8907_regulator_remove()
Add missing platform_get_drvdata() call in max8907_regulator_remove(), this fixes below build warning: CC [M] drivers/regulator/max8907-regulator.o drivers/regulator/max8907-regulator.c: In function 'max8907_regulator_remove': drivers/regulator/max8907-regulator.c:353:23: warning: 'pmic' is used uninitialized in this function [-Wuninitialized] Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/max8907-regulator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/max8907-regulator.c b/drivers/regulator/max8907-regulator.c
index bdf21a199612..bddc3146c924 100644
--- a/drivers/regulator/max8907-regulator.c
+++ b/drivers/regulator/max8907-regulator.c
@@ -347,7 +347,7 @@ err_unregister_regulator:
static __devexit int max8907_regulator_remove(struct platform_device *pdev)
{
- struct max8907_regulator *pmic;
+ struct max8907_regulator *pmic = platform_get_drvdata(pdev);
int i;
for (i = 0; i < MAX8907_NUM_REGULATORS; i++)