diff options
author | Axel Lin <axel.lin@ingics.com> | 2013-09-03 06:24:46 (GMT) |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-09-16 23:27:56 (GMT) |
commit | ea49a5ebbbfa982c893d4d6cf68feeb829f58324 (patch) | |
tree | ac6c82ff9b55ec641c0d2d2a5f7b5bf51152f9bf /drivers/regulator/da9052-regulator.c | |
parent | 4e8d79355da117b4be7ea6f870eabc7f18740f2c (diff) | |
download | linux-fsl-qoriq-ea49a5ebbbfa982c893d4d6cf68feeb829f58324.tar.xz |
regulator: da9052: Convert to devm_regulator_register
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/regulator/da9052-regulator.c')
-rw-r--r-- | drivers/regulator/da9052-regulator.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/regulator/da9052-regulator.c b/drivers/regulator/da9052-regulator.c index 1e4d483..c427e42 100644 --- a/drivers/regulator/da9052-regulator.c +++ b/drivers/regulator/da9052-regulator.c @@ -389,8 +389,9 @@ static int da9052_regulator_probe(struct platform_device *pdev) #endif } - regulator->rdev = regulator_register(®ulator->info->reg_desc, - &config); + regulator->rdev = devm_regulator_register(&pdev->dev, + ®ulator->info->reg_desc, + &config); if (IS_ERR(regulator->rdev)) { dev_err(&pdev->dev, "failed to register regulator %s\n", regulator->info->reg_desc.name); @@ -402,17 +403,8 @@ static int da9052_regulator_probe(struct platform_device *pdev) return 0; } -static int da9052_regulator_remove(struct platform_device *pdev) -{ - struct da9052_regulator *regulator = platform_get_drvdata(pdev); - - regulator_unregister(regulator->rdev); - return 0; -} - static struct platform_driver da9052_regulator_driver = { .probe = da9052_regulator_probe, - .remove = da9052_regulator_remove, .driver = { .name = "da9052-regulator", .owner = THIS_MODULE, |