mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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 07/11] regulator: wm831x-isink: Convert to devm_regulator_register()
Date: Sat, 31 Aug 2013 12:29:22 +0100	[thread overview]
Message-ID: <1377948564-8383-7-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/wm831x-isink.c | 17 +++--------------
 1 file changed, 3 insertions(+), 14 deletions(-)

diff --git a/drivers/regulator/wm831x-isink.c b/drivers/regulator/wm831x-isink.c
index 841cb52..0339b88 100644
--- a/drivers/regulator/wm831x-isink.c
+++ b/drivers/regulator/wm831x-isink.c
@@ -194,7 +194,8 @@ static int wm831x_isink_probe(struct platform_device *pdev)
 	config.init_data = pdata->isink[id];
 	config.driver_data = isink;
 
-	isink->regulator = regulator_register(&isink->desc, &config);
+	isink->regulator = devm_regulator_register(&pdev->dev, &isink->desc,
+						   &config);
 	if (IS_ERR(isink->regulator)) {
 		ret = PTR_ERR(isink->regulator);
 		dev_err(wm831x->dev, "Failed to register ISINK%d: %d\n",
@@ -210,31 +211,19 @@ static int wm831x_isink_probe(struct platform_device *pdev)
 	if (ret != 0) {
 		dev_err(&pdev->dev, "Failed to request ISINK IRQ %d: %d\n",
 			irq, ret);
-		goto err_regulator;
+		goto err;
 	}
 
 	platform_set_drvdata(pdev, isink);
 
 	return 0;
 
-err_regulator:
-	regulator_unregister(isink->regulator);
 err:
 	return ret;
 }
 
-static int wm831x_isink_remove(struct platform_device *pdev)
-{
-	struct wm831x_isink *isink = platform_get_drvdata(pdev);
-
-	regulator_unregister(isink->regulator);
-
-	return 0;
-}
-
 static struct platform_driver wm831x_isink_driver = {
 	.probe = wm831x_isink_probe,
-	.remove = wm831x_isink_remove,
 	.driver		= {
 		.name	= "wm831x-isink",
 		.owner	= THIS_MODULE,
-- 
1.8.4.rc3


  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 ` Mark Brown [this message]
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-7-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