]> git.karo-electronics.de Git - linux-beck.git/commitdiff
regulator: s2mps11: Use devm_regulator_register
authorSachin Kamat <sachin.kamat@linaro.org>
Wed, 4 Sep 2013 06:42:15 +0000 (12:12 +0530)
committerMark Brown <broonie@linaro.org>
Mon, 16 Sep 2013 23:28:40 +0000 (00:28 +0100)
Commit e398b51a ("regulator: s2mps11: Convert to devm_regulator_register()")
intended to do this conversion. However the actual conversion to devm_* got
missed out. Fix this.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/regulator/s2mps11.c

index d7c241e1a17336171f661345e37a0e5f553e8acd..333677d68d0ee31f784e76906bc930b592fc7257 100644 (file)
@@ -448,7 +448,8 @@ common_reg:
                        config.of_node = rdata[i].of_node;
                }
 
-               s2mps11->rdev[i] = regulator_register(&regulators[i], &config);
+               s2mps11->rdev[i] = devm_regulator_register(&pdev->dev,
+                                               &regulators[i], &config);
                if (IS_ERR(s2mps11->rdev[i])) {
                        ret = PTR_ERR(s2mps11->rdev[i]);
                        dev_err(&pdev->dev, "regulator init failed for %d\n",