diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-09-30 09:59:31 +0900 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-09-30 18:11:03 +0100 |
commit | abf92a3d2e868fef808d4a205371b7e5417dd0f7 (patch) | |
tree | b4aeaf24a54889df5902f2d3f191e481e3c37a3a | |
parent | 00ce070e51f96ee4c942b44d63b7a15f5b777fd6 (diff) | |
download | linux-abf92a3d2e868fef808d4a205371b7e5417dd0f7.tar.bz2 |
regulator: vexpress: use devm_regulator_register()
Use devm_regulator_register() to make cleanup paths simpler.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Pawel Moll <pawel.moll@arm.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r-- | drivers/regulator/vexpress.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/regulator/vexpress.c b/drivers/regulator/vexpress.c index 4668c7f8133d..f3ae28a7e663 100644 --- a/drivers/regulator/vexpress.c +++ b/drivers/regulator/vexpress.c @@ -96,7 +96,7 @@ static int vexpress_regulator_probe(struct platform_device *pdev) config.driver_data = reg; config.of_node = pdev->dev.of_node; - reg->regdev = regulator_register(®->desc, &config); + reg->regdev = devm_regulator_register(&pdev->dev, ®->desc, &config); if (IS_ERR(reg->regdev)) { err = PTR_ERR(reg->regdev); goto error_regulator_register; @@ -119,7 +119,6 @@ static int vexpress_regulator_remove(struct platform_device *pdev) struct vexpress_regulator *reg = platform_get_drvdata(pdev); vexpress_config_func_put(reg->func); - regulator_unregister(reg->regdev); return 0; } |