diff options
Diffstat (limited to 'drivers/regulator/aat2870-regulator.c')
-rw-r--r-- | drivers/regulator/aat2870-regulator.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/regulator/aat2870-regulator.c b/drivers/regulator/aat2870-regulator.c index 881159dfcb5e..f70a9bfa5ff2 100644 --- a/drivers/regulator/aat2870-regulator.c +++ b/drivers/regulator/aat2870-regulator.c | |||
@@ -176,7 +176,7 @@ static int aat2870_regulator_probe(struct platform_device *pdev) | |||
176 | config.driver_data = ri; | 176 | config.driver_data = ri; |
177 | config.init_data = dev_get_platdata(&pdev->dev); | 177 | config.init_data = dev_get_platdata(&pdev->dev); |
178 | 178 | ||
179 | rdev = regulator_register(&ri->desc, &config); | 179 | rdev = devm_regulator_register(&pdev->dev, &ri->desc, &config); |
180 | if (IS_ERR(rdev)) { | 180 | if (IS_ERR(rdev)) { |
181 | dev_err(&pdev->dev, "Failed to register regulator %s\n", | 181 | dev_err(&pdev->dev, "Failed to register regulator %s\n", |
182 | ri->desc.name); | 182 | ri->desc.name); |
@@ -187,21 +187,12 @@ static int aat2870_regulator_probe(struct platform_device *pdev) | |||
187 | return 0; | 187 | return 0; |
188 | } | 188 | } |
189 | 189 | ||
190 | static int aat2870_regulator_remove(struct platform_device *pdev) | ||
191 | { | ||
192 | struct regulator_dev *rdev = platform_get_drvdata(pdev); | ||
193 | |||
194 | regulator_unregister(rdev); | ||
195 | return 0; | ||
196 | } | ||
197 | |||
198 | static struct platform_driver aat2870_regulator_driver = { | 190 | static struct platform_driver aat2870_regulator_driver = { |
199 | .driver = { | 191 | .driver = { |
200 | .name = "aat2870-regulator", | 192 | .name = "aat2870-regulator", |
201 | .owner = THIS_MODULE, | 193 | .owner = THIS_MODULE, |
202 | }, | 194 | }, |
203 | .probe = aat2870_regulator_probe, | 195 | .probe = aat2870_regulator_probe, |
204 | .remove = aat2870_regulator_remove, | ||
205 | }; | 196 | }; |
206 | 197 | ||
207 | static int __init aat2870_regulator_init(void) | 198 | static int __init aat2870_regulator_init(void) |