diff options
| -rw-r--r-- | drivers/regulator/pcf50633-regulator.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/regulator/pcf50633-regulator.c b/drivers/regulator/pcf50633-regulator.c index 0f3576d48abf..d7da1c15a6da 100644 --- a/drivers/regulator/pcf50633-regulator.c +++ b/drivers/regulator/pcf50633-regulator.c | |||
| @@ -90,7 +90,8 @@ static int pcf50633_regulator_probe(struct platform_device *pdev) | |||
| 90 | config.driver_data = pcf; | 90 | config.driver_data = pcf; |
| 91 | config.regmap = pcf->regmap; | 91 | config.regmap = pcf->regmap; |
| 92 | 92 | ||
| 93 | rdev = regulator_register(®ulators[pdev->id], &config); | 93 | rdev = devm_regulator_register(&pdev->dev, ®ulators[pdev->id], |
| 94 | &config); | ||
| 94 | if (IS_ERR(rdev)) | 95 | if (IS_ERR(rdev)) |
| 95 | return PTR_ERR(rdev); | 96 | return PTR_ERR(rdev); |
| 96 | 97 | ||
| @@ -102,21 +103,11 @@ static int pcf50633_regulator_probe(struct platform_device *pdev) | |||
| 102 | return 0; | 103 | return 0; |
| 103 | } | 104 | } |
| 104 | 105 | ||
| 105 | static int pcf50633_regulator_remove(struct platform_device *pdev) | ||
| 106 | { | ||
| 107 | struct regulator_dev *rdev = platform_get_drvdata(pdev); | ||
| 108 | |||
| 109 | regulator_unregister(rdev); | ||
| 110 | |||
| 111 | return 0; | ||
| 112 | } | ||
| 113 | |||
| 114 | static struct platform_driver pcf50633_regulator_driver = { | 106 | static struct platform_driver pcf50633_regulator_driver = { |
| 115 | .driver = { | 107 | .driver = { |
| 116 | .name = "pcf50633-regltr", | 108 | .name = "pcf50633-regltr", |
| 117 | }, | 109 | }, |
| 118 | .probe = pcf50633_regulator_probe, | 110 | .probe = pcf50633_regulator_probe, |
| 119 | .remove = pcf50633_regulator_remove, | ||
| 120 | }; | 111 | }; |
| 121 | 112 | ||
| 122 | static int __init pcf50633_regulator_init(void) | 113 | static int __init pcf50633_regulator_init(void) |
