From: Hal Feng Date: Wed, 30 Nov 2022 07:15:11 +0000 (+0800) Subject: pwm: starfive: Use pm_runtime functions to disable clock when the device being removed X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b6038e7a01deb91ba1cb86ffcf5c3cc8cab1751a;p=platform%2Fkernel%2Flinux-starfive.git pwm: starfive: Use pm_runtime functions to disable clock when the device being removed So this can avoid disabling the pwm clock again when the pwm device is suspended and being removed. Signed-off-by: Hal Feng --- diff --git a/drivers/pwm/pwm-starfive-ptc.c b/drivers/pwm/pwm-starfive-ptc.c index 746e6ce..0874bbb 100644 --- a/drivers/pwm/pwm-starfive-ptc.c +++ b/drivers/pwm/pwm-starfive-ptc.c @@ -250,10 +250,9 @@ static int starfive_pwm_ptc_remove(struct platform_device *dev) struct starfive_pwm_ptc_device *pwm = platform_get_drvdata(dev); struct pwm_chip *chip = &pwm->chip; - clk_disable_unprepare(pwm->clk); pwmchip_remove(chip); - pm_runtime_disable(&dev->dev); + pm_runtime_force_suspend(&dev->dev); return 0; }