From: Mark Brown <broonie@kernel.org>
To: Sangbeom Kim <sbkim73@samsung.com>, Liam Girdwood <lgirdwood@gmail.com>
Cc: patches@opensource.wolfsonmicro.com,
linux-kernel@vger.kernel.org, linaro-kernel@lists.linaro.org,
Mark Brown <broonie@linaro.org>
Subject: [PATCH 03/11] regulator: arizona-micsupp: Convert to devm_regulator_register()
Date: Sat, 31 Aug 2013 12:29:18 +0100 [thread overview]
Message-ID: <1377948564-8383-3-git-send-email-broonie@kernel.org> (raw)
In-Reply-To: <1377948564-8383-1-git-send-email-broonie@kernel.org>
From: Mark Brown <broonie@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
---
drivers/regulator/arizona-micsupp.c | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/drivers/regulator/arizona-micsupp.c b/drivers/regulator/arizona-micsupp.c
index e87536b..724706a 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,
--
1.8.4.rc3
next prev parent reply other threads:[~2013-08-31 11:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-31 11:29 [PATCH 01/11] regulator: core: Provide managed regulator registration Mark Brown
2013-08-31 11:29 ` [PATCH 02/11] regulator: arizona-ldo1: Convert to devm_regulator_register() Mark Brown
2013-08-31 11:29 ` Mark Brown [this message]
2013-08-31 11:29 ` [PATCH 04/11] regulator: s2mps11: " Mark Brown
2013-09-02 10:08 ` Sangbeom Kim
2013-08-31 11:29 ` [PATCH 05/11] regulator: s5m8767: Covert " Mark Brown
2013-09-02 10:09 ` Sangbeom Kim
2013-08-31 11:29 ` [PATCH 06/11] regulator: wm831x-dcdc: Convert " Mark Brown
2013-08-31 11:29 ` [PATCH 07/11] regulator: wm831x-isink: " Mark Brown
2013-08-31 11:29 ` [PATCH 08/11] regulator: wm831x-ldo: " Mark Brown
2013-08-31 11:29 ` [PATCH 09/11] regulator: wm8350: " Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1377948564-8383-3-git-send-email-broonie@kernel.org \
--to=broonie@kernel.org \
--cc=broonie@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linaro-kernel@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@opensource.wolfsonmicro.com \
--cc=sbkim73@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome