diff options
author | Axel Lin <axel.lin@ingics.com> | 2013-09-03 10:23:14 +0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-09-17 03:27:56 +0400 |
commit | 4e8d79355da117b4be7ea6f870eabc7f18740f2c (patch) | |
tree | d2d85a41a0e8c83b1699ebb6af86b13f11dd2980 | |
parent | 27447c934a9e6ea7753f61211ef06327915ed0d2 (diff) | |
download | linux-4e8d79355da117b4be7ea6f870eabc7f18740f2c.tar.xz |
regulator: da903x: Convert to devm_regulator_register
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r-- | drivers/regulator/da903x.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/regulator/da903x.c b/drivers/regulator/da903x.c index f06854cf8cf5..c61d96e9d925 100644 --- a/drivers/regulator/da903x.c +++ b/drivers/regulator/da903x.c @@ -463,7 +463,7 @@ static int da903x_regulator_probe(struct platform_device *pdev) config.init_data = dev_get_platdata(&pdev->dev); config.driver_data = ri; - rdev = regulator_register(&ri->desc, &config); + rdev = devm_regulator_register(&pdev->dev, &ri->desc, &config); if (IS_ERR(rdev)) { dev_err(&pdev->dev, "failed to register regulator %s\n", ri->desc.name); @@ -474,21 +474,12 @@ static int da903x_regulator_probe(struct platform_device *pdev) return 0; } -static int da903x_regulator_remove(struct platform_device *pdev) -{ - struct regulator_dev *rdev = platform_get_drvdata(pdev); - - regulator_unregister(rdev); - return 0; -} - static struct platform_driver da903x_regulator_driver = { .driver = { .name = "da903x-regulator", .owner = THIS_MODULE, }, .probe = da903x_regulator_probe, - .remove = da903x_regulator_remove, }; static int __init da903x_regulator_init(void) |