public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jingoo Han <jg1.han@samsung.com>
To: "'Mark Brown'" <broonie@kernel.org>
Cc: "'Liam Girdwood'" <lgirdwood@gmail.com>,
	linux-kernel@vger.kernel.org,
	"'Jingoo Han'" <jg1.han@samsung.com>,
	"'Marek Szyprowski'" <m.szyprowski@samsung.com>
Subject: [PATCH V2 09/18] regulator: lp8788-buck: use devm_regulator_register()
Date: Thu, 26 Sep 2013 11:08:46 +0900	[thread overview]
Message-ID: <000f01ceba5d$550b6ca0$ff2245e0$%han@samsung.com> (raw)
In-Reply-To: <000701ceba5c$69459b10$3bd0d130$%han@samsung.com>

Use devm_regulator_register() to make cleanup paths simpler,
and remove unnecessary remove().

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/regulator/lp8788-buck.c |   12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/regulator/lp8788-buck.c b/drivers/regulator/lp8788-buck.c
index 0b015f2..948afc2 100644
--- a/drivers/regulator/lp8788-buck.c
+++ b/drivers/regulator/lp8788-buck.c
@@ -515,7 +515,7 @@ static int lp8788_buck_probe(struct platform_device *pdev)
 	cfg.driver_data = buck;
 	cfg.regmap = lp->regmap;
 
-	rdev = regulator_register(&lp8788_buck_desc[id], &cfg);
+	rdev = devm_regulator_register(&pdev->dev, &lp8788_buck_desc[id], &cfg);
 	if (IS_ERR(rdev)) {
 		ret = PTR_ERR(rdev);
 		dev_err(&pdev->dev, "BUCK%d regulator register err = %d\n",
@@ -529,18 +529,8 @@ static int lp8788_buck_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int lp8788_buck_remove(struct platform_device *pdev)
-{
-	struct lp8788_buck *buck = platform_get_drvdata(pdev);
-
-	regulator_unregister(buck->regulator);
-
-	return 0;
-}
-
 static struct platform_driver lp8788_buck_driver = {
 	.probe = lp8788_buck_probe,
-	.remove = lp8788_buck_remove,
 	.driver = {
 		.name = LP8788_DEV_BUCK,
 		.owner = THIS_MODULE,
-- 
1.7.10.4



  parent reply	other threads:[~2013-09-26  2:08 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-26  2:02 [PATCH V2 01/18] regulator: ab3100: use devm_regulator_register() Jingoo Han
2013-09-26  2:03 ` [PATCH V2 02/18] regulator: ab8500-ext: " Jingoo Han
2013-09-26  2:04 ` [PATCH V2 03/18] regulator: da9063: " Jingoo Han
2013-09-26  2:04 ` [PATCH V2 04/18] regulator: da9210: " Jingoo Han
2013-09-26  2:05 ` [PATCH V2 05/18] regulator: fixed: " Jingoo Han
2013-09-26  6:14   ` Sachin Kamat
2013-09-26  6:25     ` Jingoo Han
2013-09-26 10:16       ` Mark Brown
2013-09-26  2:06 ` [PATCH V2 06/18] regulator: gpio-regulator: " Jingoo Han
2013-09-26  6:20   ` Sachin Kamat
2013-09-26  6:30     ` Jingoo Han
2013-09-26  2:07 ` [PATCH V2 07/18] regulator: lp3971: " Jingoo Han
2013-09-26  6:36   ` Jingoo Han
2013-09-26  2:08 ` [PATCH V2 08/18] regulator: lp872x: " Jingoo Han
2013-09-26  2:08 ` Jingoo Han [this message]
2013-09-26  2:09 ` [PATCH V2 10/18] regulator: lp8788-ldo: " Jingoo Han
2013-09-26  2:09 ` [PATCH V2 11/18] regulator: max8925: " Jingoo Han
2013-09-26  2:10 ` [PATCH V2 12/18] regulator: max8952: " Jingoo Han
2013-09-26  6:41   ` Jingoo Han
2013-09-26  2:10 ` [PATCH V2 13/18] regulator: pcap: " Jingoo Han
2013-09-26  2:11 ` [PATCH V2 14/18] regulator: pcf50633: " Jingoo Han
2013-09-26  2:11 ` [PATCH V2 15/18] regulator: tps6105x: " Jingoo Han
2013-09-26  2:12 ` [PATCH V2 16/18] regulator: tps6524x: " Jingoo Han
2013-09-26  2:13 ` [PATCH V2 17/18] regulator: twl: " Jingoo Han
2013-09-26  7:11   ` Jingoo Han
2013-09-26  2:13 ` [PATCH V2 18/18] regulator: vexpress: " Jingoo Han

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='000f01ceba5d$550b6ca0$ff2245e0$%han@samsung.com' \
    --to=jg1.han@samsung.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@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