Skip to contentSkip to conversation

regulator: tps6586x - add regulator_unregister() in tps6586x_regulator_remove()

PATCH Applied Axel Lin 4 participants 4 messages Aug 9, 2010 – Aug 10, 2010 Voltage and current regulator framework

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 regulator: tps6586x - add regulator_unregister() in tps6586x_regulator_remove()

---
 drivers/regulator/tps6586x-regulator.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
drivers/regulator/tps6586x-regulator.c +4 -1
index 3c2eee8..122193b 100644
@@ -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;
 }
 
Signature · 1 line
1.5.4.3
Acked-by on v1 1/1
#1 lore raw
Quoted 1 line · Axel Lin

drivers/regulator/tps6586x-regulator.c static int __devinit tps6586x_regulator_probe(struct platform_device *pdev) · line 360

Quoted 4 lines
drivers/regulator/tps6586x-regulator.c +1 -1
-	platform_set_drvdata(pdev, ri);
+	platform_set_drvdata(pdev, rdev);

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.

Acked-by
#2 lore raw
Quoted 4 lines · Mark Brown
Quoted 1 line · Axel Lin
Quoted 9 lines

drivers/regulator/tps6586x-regulator.c static int __devinit tps6586x_regulator_probe(struct platform_device *pdev) · line 360

Quoted 5 lines
drivers/regulator/tps6586x-regulator.c +1 -1
-	platform_set_drvdata(pdev, ri);
+	platform_set_drvdata(pdev, rdev);

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.

Signature · 2 lines
Sincerely yours,
Mike.