diff options
author | Axel Lin <axel.lin@ingics.com> | 2013-09-03 14:27:56 +0800 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-09-17 00:28:40 +0100 |
commit | b15f5f7603fe9963e2201874f6e6c6cc0410b4d1 (patch) | |
tree | 563168eb25d7cea6129b29347825041f493e0cd0 /drivers/regulator/fan53555.c | |
parent | 0d3288063b4e45335ea011b89d0850a0fd76096c (diff) |
regulator: fan53555: Convert to devm_regulator_register
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/regulator/fan53555.c')
-rw-r--r-- | drivers/regulator/fan53555.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/regulator/fan53555.c b/drivers/regulator/fan53555.c index 70b7220c587f..7ca3d9e3b0fe 100644 --- a/drivers/regulator/fan53555.c +++ b/drivers/regulator/fan53555.c @@ -218,9 +218,8 @@ static int fan53555_regulator_register(struct fan53555_device_info *di, rdesc->vsel_mask = VSEL_NSEL_MASK; rdesc->owner = THIS_MODULE; - di->rdev = regulator_register(&di->desc, config); + di->rdev = devm_regulator_register(di->dev, &di->desc, config); return PTR_ERR_OR_ZERO(di->rdev); - } static struct regmap_config fan53555_regmap_config = { @@ -291,14 +290,6 @@ static int fan53555_regulator_probe(struct i2c_client *client, } -static int fan53555_regulator_remove(struct i2c_client *client) -{ - struct fan53555_device_info *di = i2c_get_clientdata(client); - - regulator_unregister(di->rdev); - return 0; -} - static const struct i2c_device_id fan53555_id[] = { {"fan53555", -1}, { }, @@ -309,7 +300,6 @@ static struct i2c_driver fan53555_regulator_driver = { .name = "fan53555-regulator", }, .probe = fan53555_regulator_probe, - .remove = fan53555_regulator_remove, .id_table = fan53555_id, }; |