UPSTREAM: PM / devfreq: rk3399_dmc: Remove explictly regulator_put call in .remove
authorAxel Lin <axel.lin@ingics.com>
Sun, 18 Sep 2016 02:41:05 +0000 (10:41 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Wed, 29 Mar 2017 02:24:17 +0000 (10:24 +0800)
Current code uses devm_regulator_get() in .probe so a regulator_put() will
be automatically called when unload the module. Remove the explictly
regulator_put() call and then we can also remove rk3399_dmcfreq_remove().

Change-Id: I56a62a76f06403aff9ad0478e7701862084a90b3
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
(cherry picked from commit da4a64481b3504a6f4f07c08ff03be8f08d9638d)

drivers/devfreq/rk3399_dmc.c

index 9020bd3406ad7ca2961948b339fb03ee2c4b3795..9180a256cb1dcec45abf35dba6fe2db453756ada 100644 (file)
@@ -477,15 +477,6 @@ static int rk3399_dmcfreq_probe(struct platform_device *pdev)
        return 0;
 }
 
-static int rk3399_dmcfreq_remove(struct platform_device *pdev)
-{
-       struct rk3399_dmcfreq *dmcfreq = platform_get_drvdata(pdev);
-
-       regulator_put(dmcfreq->vdd_center);
-
-       return 0;
-}
-
 static const struct of_device_id rk3399dmc_devfreq_of_match[] = {
        { .compatible = "rockchip,rk3399-dmc" },
        { },
@@ -493,7 +484,6 @@ static const struct of_device_id rk3399dmc_devfreq_of_match[] = {
 
 static struct platform_driver rk3399_dmcfreq_driver = {
        .probe  = rk3399_dmcfreq_probe,
-       .remove = rk3399_dmcfreq_remove,
        .driver = {
                .name   = "rk3399-dmc-freq",
                .pm     = &rk3399_dmcfreq_pm,