regulator: tps65218: Remove unnecessary regulator_unregister call
authorAxel Lin <axel.lin@ingics.com>
Wed, 19 Feb 2014 08:34:11 +0000 (16:34 +0800)
committerMark Brown <broonie@linaro.org>
Wed, 19 Feb 2014 12:18:54 +0000 (21:18 +0900)
Current code uses devm_regulator_register() so the we don't need to explicitly
call regulator_unregister() in .remove.
And then we don't need to save rdev pointer to tps->rdev[id].

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/regulator/tps65218-regulator.c

index d1c78313aa28181faaf4e725b0708102721f3e09..1fb1db551ec9db70bf073cd8a05712f6849cecc4 100644 (file)
@@ -267,23 +267,6 @@ static int tps65218_regulator_probe(struct platform_device *pdev)
                return PTR_ERR(rdev);
        }
 
-       /* Save regulator */
-       tps->rdev[id] = rdev;
-
-       return 0;
-}
-
-static int tps65218_regulator_remove(struct platform_device *pdev)
-{
-       struct tps65218 *tps = platform_get_drvdata(pdev);
-       const struct of_device_id       *match;
-       const struct tps_info           *template;
-
-       match = of_match_device(tps65218_of_match, &pdev->dev);
-       template = match->data;
-       regulator_unregister(tps->rdev[template->id]);
-       platform_set_drvdata(pdev, NULL);
-
        return 0;
 }
 
@@ -294,7 +277,6 @@ static struct platform_driver tps65218_regulator_driver = {
                .of_match_table = of_match_ptr(tps65218_of_match),
        },
        .probe = tps65218_regulator_probe,
-       .remove = tps65218_regulator_remove,
 };
 
 module_platform_driver(tps65218_regulator_driver);
This page took 0.03437 seconds and 5 git commands to generate.