public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH V3 01/14] regulator: ab3100: use devm_regulator_register()
@ 2013-09-26  7:46 Jingoo Han
  2013-09-26  7:47 ` [PATCH V3 02/14] regulator: ab8500-ext: " Jingoo Han
                   ` (13 more replies)
  0 siblings, 14 replies; 21+ messages in thread
From: Jingoo Han @ 2013-09-26  7:46 UTC (permalink / raw)
  To: 'Mark Brown'
  Cc: 'Liam Girdwood', linux-kernel, 'Jingoo Han',
	'Linus Walleij'

Use devm_regulator_register() to make cleanup paths simpler.

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

diff --git a/drivers/regulator/ab3100.c b/drivers/regulator/ab3100.c
index 7d5eaa8..77b46d0 100644
--- a/drivers/regulator/ab3100.c
+++ b/drivers/regulator/ab3100.c
@@ -535,7 +535,7 @@ static int ab3100_regulator_register(struct platform_device *pdev,
 	config.dev = &pdev->dev;
 	config.driver_data = reg;
 
-	rdev = regulator_register(desc, &config);
+	rdev = devm_regulator_register(&pdev->dev, desc, &config);
 	if (IS_ERR(rdev)) {
 		err = PTR_ERR(rdev);
 		dev_err(&pdev->dev,
@@ -616,7 +616,6 @@ static int ab3100_regulators_remove(struct platform_device *pdev)
 	for (i = 0; i < AB3100_NUM_REGULATORS; i++) {
 		struct ab3100_regulator *reg = &ab3100_regulators[i];
 
-		regulator_unregister(reg->rdev);
 		reg->rdev = NULL;
 	}
 	return 0;
-- 
1.7.10.4



^ permalink raw reply related	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2013-09-30  0:46 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-26  7:46 [PATCH V3 01/14] regulator: ab3100: use devm_regulator_register() Jingoo Han
2013-09-26  7:47 ` [PATCH V3 02/14] regulator: ab8500-ext: " Jingoo Han
2013-09-26  7:48 ` [PATCH V3 03/14] regulator: da9063: " Jingoo Han
2013-09-26  7:48 ` [PATCH V3 04/14] regulator: da9210: " Jingoo Han
2013-09-26  7:49 ` [PATCH V3 05/14] regulator: lp872x: " Jingoo Han
2013-09-26  7:50 ` [PATCH V3 06/14] regulator: lp8788-buck: " Jingoo Han
2013-09-26  7:50 ` From 782c15faac0a93cdac43b212073081707f669272 Mon Sep 17 00:00:00 2001 Jingoo Han
2013-09-26  7:55   ` Sachin Kamat
2013-09-26  8:00     ` Jingoo Han
2013-09-26  7:51 ` [PATCH V3 08/14] regulator: max8925: use devm_regulator_register() Jingoo Han
2013-09-26  7:51 ` [PATCH V3 09/14] regulator: pcap: " Jingoo Han
2013-09-26  7:52 ` [PATCH V3 10/14] regulator: pcf50633: " Jingoo Han
2013-09-26  7:52 ` [PATCH V3 11/14] regulator: tps6105x: " Jingoo Han
2013-09-26  7:53 ` [PATCH V3 12/14] regulator: tps6524x: " Jingoo Han
2013-09-26  8:06   ` Axel Lin
2013-09-26  8:13     ` Jingoo Han
2013-09-26  8:22       ` Axel Lin
2013-09-30  0:46         ` Jingoo Han
2013-09-26  7:53 ` [PATCH V3 13/14] regulator: twl: " Jingoo Han
2013-09-26  7:54 ` [PATCH V3 14/14] regulator: vexpress: " Jingoo Han
2013-09-26  7:57 ` [PATCH V3 07/14] regulator: lp8788-ldo: " Jingoo Han

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox