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 09/11] regulator: wm8350: Convert to devm_regulator_register()
Date: Sat, 31 Aug 2013 12:29:24 +0100 [thread overview]
Message-ID: <1377948564-8383-9-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/wm8350-regulator.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/regulator/wm8350-regulator.c b/drivers/regulator/wm8350-regulator.c
index 835b5f0..a438e93 100644
--- a/drivers/regulator/wm8350-regulator.c
+++ b/drivers/regulator/wm8350-regulator.c
@@ -1206,7 +1206,8 @@ static int wm8350_regulator_probe(struct platform_device *pdev)
config.regmap = wm8350->regmap;
/* register regulator */
- rdev = regulator_register(&wm8350_reg[pdev->id], &config);
+ rdev = devm_regulator_register(&pdev->dev, &wm8350_reg[pdev->id],
+ &config);
if (IS_ERR(rdev)) {
dev_err(&pdev->dev, "failed to register %s\n",
wm8350_reg[pdev->id].name);
@@ -1217,7 +1218,6 @@ static int wm8350_regulator_probe(struct platform_device *pdev)
ret = wm8350_register_irq(wm8350, wm8350_reg[pdev->id].irq,
pmic_uv_handler, 0, "UV", rdev);
if (ret < 0) {
- regulator_unregister(rdev);
dev_err(&pdev->dev, "failed to register regulator %s IRQ\n",
wm8350_reg[pdev->id].name);
return ret;
@@ -1233,8 +1233,6 @@ static int wm8350_regulator_remove(struct platform_device *pdev)
wm8350_free_irq(wm8350, wm8350_reg[pdev->id].irq, rdev);
- regulator_unregister(rdev);
-
return 0;
}
--
1.8.4.rc3
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 ` [PATCH 03/11] regulator: arizona-micsupp: " Mark Brown
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 ` Mark Brown [this message]
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-9-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