summaryrefslogtreecommitdiff
path: root/drivers/regulator/tps6586x-regulator.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2010-08-09 15:58:06 +0800
committerLiam Girdwood <lrg@slimlogic.co.uk>2010-08-11 11:38:03 +0100
commite7973c3cb352e09751afabcb0c0f9fd3032965b6 (patch)
treeac790c69114f28ac80aee46ef1aa0ccd1d463284 /drivers/regulator/tps6586x-regulator.c
parent8f1f151ed8ae4063837221cc9f5386a7af59f4e0 (diff)
regulator: tps6586x - add regulator_unregister() in tps6586x_regulator_remove()
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Mike Rapoport <mike@compulab.co.il> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'drivers/regulator/tps6586x-regulator.c')
-rw-r--r--drivers/regulator/tps6586x-regulator.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/regulator/tps6586x-regulator.c b/drivers/regulator/tps6586x-regulator.c
index 3c2eee8e7563..122193b5e269 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;
}