[PATCH] regulator: tps6586x - add regulator_unregister() intps6586x_regulator_remove()

From: Axel Lin
Date: Mon Aug 09 2010 - 03:56:27 EST


Signed-off-by: Axel Lin <axel.lin@xxxxxxxxx>
---
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



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/