diff options
author | Mark Brown <broonie@linaro.org> | 2013-08-31 12:00:57 +0100 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-09-17 00:27:55 +0100 |
commit | eb8b3c8360408b78ca99492f8c1fec080c75dd71 (patch) | |
tree | 46cf176fd9343a166fe04f8e858f02ad86a0bdad /drivers/regulator/wm8400-regulator.c | |
parent | e57e54693371fe1530f376c8a67c33d19bb2a0dc (diff) | |
download | op-kernel-dev-eb8b3c8360408b78ca99492f8c1fec080c75dd71.zip op-kernel-dev-eb8b3c8360408b78ca99492f8c1fec080c75dd71.tar.gz |
regulator: wm8400: Convert to devm_regulator_register()
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/regulator/wm8400-regulator.c')
-rw-r--r-- | drivers/regulator/wm8400-regulator.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/regulator/wm8400-regulator.c b/drivers/regulator/wm8400-regulator.c index 58f51be..870b52f 100644 --- a/drivers/regulator/wm8400-regulator.c +++ b/drivers/regulator/wm8400-regulator.c @@ -219,7 +219,8 @@ static int wm8400_regulator_probe(struct platform_device *pdev) config.driver_data = wm8400; config.regmap = wm8400->regmap; - rdev = regulator_register(®ulators[pdev->id], &config); + rdev = devm_regulator_register(&pdev->dev, ®ulators[pdev->id], + &config); if (IS_ERR(rdev)) return PTR_ERR(rdev); @@ -228,21 +229,11 @@ static int wm8400_regulator_probe(struct platform_device *pdev) return 0; } -static int wm8400_regulator_remove(struct platform_device *pdev) -{ - struct regulator_dev *rdev = platform_get_drvdata(pdev); - - regulator_unregister(rdev); - - return 0; -} - static struct platform_driver wm8400_regulator_driver = { .driver = { .name = "wm8400-regulator", }, .probe = wm8400_regulator_probe, - .remove = wm8400_regulator_remove, }; /** |