Re: [PATCH] regulator: tps6586x - add regulator_unregister() in tps6586x_regulator_remove()

Previous thread: [PATCH RESEND] regulator: tps6507x - add missing platform_set_drvdata in tps6507x_pmic_probe by Axel Lin on Monday, August 9, 2010 - 12:51 am. (3 messages)

Next thread: how to transplant a driver from 2.4 to 2.6? by hacklu on Monday, August 9, 2010 - 1:03 am. (3 messages)
From: Axel Lin
Date: Monday, August 9, 2010 - 12:58 am

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 drivers/regulator/tps6586x-regulator.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/regulator/tps6586x-regulator.c b/drivers/regulator/tps6586x-regulator.c
index 3c2eee8..122193b 100644
--- a/drivers/regulator/tps6586x-regulator.c
+++ b/drivers/regulator/tps6586x-regulator.c
@@ -357,13 +357,16 @@ static int __devinit tps6586x_regulator_probe(struct platform_device *pdev)
 		return PTR_ERR(rdev);
 	}
 
-	platform_set_drvdata(pdev, ri);
+	platform_set_drvdata(pdev, rdev);
 
 	return 0;
 }
 
 static int __devexit tps6586x_regulator_remove(struct platform_device *pdev)
 {
+	struct regulator_dev *rdev = platform_get_drvdata(pdev);
+
+	regulator_unregister(rdev);
 	return 0;
 }
 
-- 
1.5.4.3



--

From: Mark Brown
Date: Tuesday, August 10, 2010 - 8:00 am

This would've been easier to review if you'd mentioned in the changelog
that there were no users of the current platform data, just to show that
you'd checked.
--

From: Mike Rapoport
Date: Tuesday, August 10, 2010 - 8:32 am

-- 
Sincerely yours,
Mike.
--

From: Liam Girdwood
Date: Tuesday, August 10, 2010 - 10:18 am

Applied.

Thanks

Liam
-- 
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk

--

Previous thread: [PATCH RESEND] regulator: tps6507x - add missing platform_set_drvdata in tps6507x_pmic_probe by Axel Lin on Monday, August 9, 2010 - 12:51 am. (3 messages)

Next thread: how to transplant a driver from 2.4 to 2.6? by hacklu on Monday, August 9, 2010 - 1:03 am. (3 messages)