Skip to content

Commit

Permalink
PM / devfreq: rk3399_dmc: Remove explictly regulator_put call in .remove
Browse files Browse the repository at this point in the history
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().

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>
  • Loading branch information
Axel Lin authored and Rafael J. Wysocki committed Sep 19, 2016
1 parent 54dec69 commit da4a644
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions drivers/devfreq/rk3399_dmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -450,23 +450,13 @@ 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" },
{ },
};

static struct platform_driver rk3399_dmcfreq_driver = {
.probe = rk3399_dmcfreq_probe,
.remove = rk3399_dmcfreq_remove,
.driver = {
.name = "rk3399-dmc-freq",
.pm = &rk3399_dmcfreq_pm,
Expand Down

0 comments on commit da4a644

Please sign in to comment.