diff options
| -rw-r--r-- | drivers/regulator/twl-regulator.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c index 78aae4cbb004..8ebd785485c7 100644 --- a/drivers/regulator/twl-regulator.c +++ b/drivers/regulator/twl-regulator.c | |||
| @@ -1188,7 +1188,7 @@ static int twlreg_probe(struct platform_device *pdev) | |||
| 1188 | config.driver_data = info; | 1188 | config.driver_data = info; |
| 1189 | config.of_node = pdev->dev.of_node; | 1189 | config.of_node = pdev->dev.of_node; |
| 1190 | 1190 | ||
| 1191 | rdev = regulator_register(&info->desc, &config); | 1191 | rdev = devm_regulator_register(&pdev->dev, &info->desc, &config); |
| 1192 | if (IS_ERR(rdev)) { | 1192 | if (IS_ERR(rdev)) { |
| 1193 | dev_err(&pdev->dev, "can't register %s, %ld\n", | 1193 | dev_err(&pdev->dev, "can't register %s, %ld\n", |
| 1194 | info->desc.name, PTR_ERR(rdev)); | 1194 | info->desc.name, PTR_ERR(rdev)); |
| @@ -1217,7 +1217,6 @@ static int twlreg_remove(struct platform_device *pdev) | |||
| 1217 | struct regulator_dev *rdev = platform_get_drvdata(pdev); | 1217 | struct regulator_dev *rdev = platform_get_drvdata(pdev); |
| 1218 | struct twlreg_info *info = rdev->reg_data; | 1218 | struct twlreg_info *info = rdev->reg_data; |
| 1219 | 1219 | ||
| 1220 | regulator_unregister(rdev); | ||
| 1221 | kfree(info); | 1220 | kfree(info); |
| 1222 | return 0; | 1221 | return 0; |
| 1223 | } | 1222 | } |
