diff options
author | Mark Brown <broonie@linaro.org> | 2013-08-31 11:57:00 +0100 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-09-17 00:27:54 +0100 |
commit | b6b7709cf95c6f5db074f2d725ddf29b0977589f (patch) | |
tree | d77ab54f43d65361048567d418669d558a18d982 /drivers/regulator/arizona-micsupp.c | |
parent | 14ffa8882bbd991497f2f87ce80382e5a1e6eb8f (diff) |
regulator: arizona-micsupp: Convert to devm_regulator_register()
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/regulator/arizona-micsupp.c')
-rw-r--r-- | drivers/regulator/arizona-micsupp.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/regulator/arizona-micsupp.c b/drivers/regulator/arizona-micsupp.c index e87536bf0be..724706a97dc 100644 --- a/drivers/regulator/arizona-micsupp.c +++ b/drivers/regulator/arizona-micsupp.c @@ -225,7 +225,9 @@ static int arizona_micsupp_probe(struct platform_device *pdev) regmap_update_bits(arizona->regmap, ARIZONA_MIC_CHARGE_PUMP_1, ARIZONA_CPMIC_BYPASS, 0); - micsupp->regulator = regulator_register(&arizona_micsupp, &config); + micsupp->regulator = devm_regulator_register(&pdev->dev, + &arizona_micsupp, + &config); if (IS_ERR(micsupp->regulator)) { ret = PTR_ERR(micsupp->regulator); dev_err(arizona->dev, "Failed to register mic supply: %d\n", @@ -238,18 +240,8 @@ static int arizona_micsupp_probe(struct platform_device *pdev) return 0; } -static int arizona_micsupp_remove(struct platform_device *pdev) -{ - struct arizona_micsupp *micsupp = platform_get_drvdata(pdev); - - regulator_unregister(micsupp->regulator); - - return 0; -} - static struct platform_driver arizona_micsupp_driver = { .probe = arizona_micsupp_probe, - .remove = arizona_micsupp_remove, .driver = { .name = "arizona-micsupp", .owner = THIS_MODULE, |