diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-09-04 06:30:57 (GMT) |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-09-16 23:28:41 (GMT) |
commit | be1221e893775d8447623475a01f877b902fc8b4 (patch) | |
tree | b664922d8f9d2114c4bff0bd8389fe172e8b00b5 /drivers | |
parent | 8d491bf42e01e8cc7597ee55cdeab20dbc75ec97 (diff) | |
download | linux-fsl-qoriq-be1221e893775d8447623475a01f877b902fc8b4.tar.xz |
regulator: anatop-regulator: Use devm_regulator_register
devm_* simplifies the code.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/regulator/anatop-regulator.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/regulator/anatop-regulator.c b/drivers/regulator/anatop-regulator.c index 0d4a8cc..e42bfd1 100644 --- a/drivers/regulator/anatop-regulator.c +++ b/drivers/regulator/anatop-regulator.c @@ -200,7 +200,7 @@ static int anatop_regulator_probe(struct platform_device *pdev) config.regmap = sreg->anatop; /* register regulator */ - rdev = regulator_register(rdesc, &config); + rdev = devm_regulator_register(dev, rdesc, &config); if (IS_ERR(rdev)) { dev_err(dev, "failed to register %s\n", rdesc->name); @@ -223,7 +223,6 @@ static int anatop_regulator_remove(struct platform_device *pdev) struct anatop_regulator *sreg = rdev_get_drvdata(rdev); const char *name = sreg->name; - regulator_unregister(rdev); kfree(name); return 0; |