]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
regulator: max8907: Properly set pmic pointer in max8907_regulator_remove()
authorAxel Lin <axel.lin@gmail.com>
Sat, 18 Aug 2012 06:33:05 +0000 (14:33 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 20 Aug 2012 19:58:25 +0000 (20:58 +0100)
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>
drivers/regulator/max8907-regulator.c

index bdf21a1996126e22b629a00c584e0f60a1e00a2a..bddc3146c924b52d5e54a23319f8254006dd0ab5 100644 (file)
@@ -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++)