mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 01/10] regulator: tps51632: Use devm_regulator_register
@ 2013-09-04 11:47 Sachin Kamat
  2013-09-04 11:47 ` [PATCH 02/10] regulator: tps62360: " Sachin Kamat
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Sachin Kamat @ 2013-09-04 11:47 UTC (permalink / raw)
  To: linux-kernel
  Cc: broonie, sachin.kamat, ldewangan, magi, gg, mike, anilkumar, vbyravarasu

devm_* simplifies the code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
This series is compile tested.
---
 drivers/regulator/tps51632-regulator.c |   11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/drivers/regulator/tps51632-regulator.c b/drivers/regulator/tps51632-regulator.c
index 6e67be7..83a745e 100644
--- a/drivers/regulator/tps51632-regulator.c
+++ b/drivers/regulator/tps51632-regulator.c
@@ -343,7 +343,7 @@ static int tps51632_probe(struct i2c_client *client,
 	config.regmap = tps->regmap;
 	config.of_node = client->dev.of_node;
 
-	rdev = regulator_register(&tps->desc, &config);
+	rdev = devm_regulator_register(&client->dev, &tps->desc, &config);
 	if (IS_ERR(rdev)) {
 		dev_err(tps->dev, "regulator register failed\n");
 		return PTR_ERR(rdev);
@@ -353,14 +353,6 @@ static int tps51632_probe(struct i2c_client *client,
 	return 0;
 }
 
-static int tps51632_remove(struct i2c_client *client)
-{
-	struct tps51632_chip *tps = i2c_get_clientdata(client);
-
-	regulator_unregister(tps->rdev);
-	return 0;
-}
-
 static const struct i2c_device_id tps51632_id[] = {
 	{.name = "tps51632",},
 	{},
@@ -375,7 +367,6 @@ static struct i2c_driver tps51632_i2c_driver = {
 		.of_match_table = of_match_ptr(tps51632_of_match),
 	},
 	.probe = tps51632_probe,
-	.remove = tps51632_remove,
 	.id_table = tps51632_id,
 };
 
-- 
1.7.9.5


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

end of thread, other threads:[~2013-09-04 18:53 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-04 11:47 [PATCH 01/10] regulator: tps51632: Use devm_regulator_register Sachin Kamat
2013-09-04 11:47 ` [PATCH 02/10] regulator: tps62360: " Sachin Kamat
2013-09-04 11:47 ` [PATCH 03/10] regulator: tps65023: " Sachin Kamat
2013-09-04 11:47 ` [PATCH 04/10] regulator: tps6507x: " Sachin Kamat
2013-09-04 11:47 ` [PATCH 05/10] regulator: tps65090: " Sachin Kamat
2013-09-04 11:47 ` [PATCH 06/10] regulator: tps65217: " Sachin Kamat
2013-09-04 11:47 ` [PATCH 07/10] regulator: tps6586x: " Sachin Kamat
2013-09-04 11:47 ` [PATCH 08/10] regulator: tps65910: " Sachin Kamat
2013-09-04 11:47 ` [PATCH 09/10] regulator: tps65912: " Sachin Kamat
2013-09-04 11:47 ` [PATCH 10/10] regulator: tps80031: " Sachin Kamat
2013-09-04 18:53 ` [PATCH 01/10] regulator: tps51632: " Mark Brown

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

all inboxes | Powered by JetHome®