aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/regulator/max8925-regulator.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/regulator/max8925-regulator.c b/drivers/regulator/max8925-regulator.c
index d80b5fa758ae..759510789e71 100644
--- a/drivers/regulator/max8925-regulator.c
+++ b/drivers/regulator/max8925-regulator.c
@@ -312,7 +312,7 @@ static int max8925_regulator_probe(struct platform_device *pdev)
312 if (pdata) 312 if (pdata)
313 config.init_data = pdata; 313 config.init_data = pdata;
314 314
315 rdev = regulator_register(&ri->desc, &config); 315 rdev = devm_regulator_register(&pdev->dev, &ri->desc, &config);
316 if (IS_ERR(rdev)) { 316 if (IS_ERR(rdev)) {
317 dev_err(&pdev->dev, "failed to register regulator %s\n", 317 dev_err(&pdev->dev, "failed to register regulator %s\n",
318 ri->desc.name); 318 ri->desc.name);
@@ -323,22 +323,12 @@ static int max8925_regulator_probe(struct platform_device *pdev)
323 return 0; 323 return 0;
324} 324}
325 325
326static int max8925_regulator_remove(struct platform_device *pdev)
327{
328 struct regulator_dev *rdev = platform_get_drvdata(pdev);
329
330 regulator_unregister(rdev);
331
332 return 0;
333}
334
335static struct platform_driver max8925_regulator_driver = { 326static struct platform_driver max8925_regulator_driver = {
336 .driver = { 327 .driver = {
337 .name = "max8925-regulator", 328 .name = "max8925-regulator",
338 .owner = THIS_MODULE, 329 .owner = THIS_MODULE,
339 }, 330 },
340 .probe = max8925_regulator_probe, 331 .probe = max8925_regulator_probe,
341 .remove = max8925_regulator_remove,
342}; 332};
343 333
344static int __init max8925_regulator_init(void) 334static int __init max8925_regulator_init(void)