diff mbox

PM / devfreq: rk3399_dmc: Remove explictly regulator_put call in .remove

Message ID 1474166465-18736-1-git-send-email-axel.lin@ingics.com (mailing list archive)
State Accepted, archived
Delegated to: Rafael Wysocki
Headers show

Commit Message

Axel Lin Sept. 18, 2016, 2:41 a.m. UTC
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>
---
 drivers/devfreq/rk3399_dmc.c | 10 ----------
 1 file changed, 10 deletions(-)

Comments

Chanwoo Choi Sept. 19, 2016, 12:16 a.m. UTC | #1
Hi,

Looks good to me.

Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>

Best Regards,
Chanwoo Choi

On 2016년 09월 18일 11:41, Axel Lin wrote:
> 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>
> ---
>  drivers/devfreq/rk3399_dmc.c | 10 ----------
>  1 file changed, 10 deletions(-)
> 
> diff --git a/drivers/devfreq/rk3399_dmc.c b/drivers/devfreq/rk3399_dmc.c
> index 54d65f2..e24b73d 100644
> --- a/drivers/devfreq/rk3399_dmc.c
> +++ b/drivers/devfreq/rk3399_dmc.c
> @@ -450,15 +450,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" },
>  	{ },
> @@ -466,7 +457,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,
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/devfreq/rk3399_dmc.c b/drivers/devfreq/rk3399_dmc.c
index 54d65f2..e24b73d 100644
--- a/drivers/devfreq/rk3399_dmc.c
+++ b/drivers/devfreq/rk3399_dmc.c
@@ -450,15 +450,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" },
 	{ },
@@ -466,7 +457,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,