Message ID | 20190726043549.18034-1-xywang.sjtu@sjtu.edu.cn (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | pwm: avoid disabling clk twice | expand |
On Fri, 26 Jul 2019, Wang Xiayang wrote: > Similar to commit 63fd4b94b948 ("serial: imx: fix error handling > in console_setup"), as ddata->clk has been explicitly disabled two > lines above, it should avoid being disabled for the second time. > clk_unprepare() suits here better. > > Signed-off-by: Wang Xiayang <xywang.sjtu@sjtu.edu.cn> The patch looks reasonable, but it needs to be sent to other people and mailing lists. Running "scripts/get_maintainer.pl -f drivers/pwm/pwm-sifive.c" shows: Thierry Reding <thierry.reding@gmail.com> (maintainer:PWM SUBSYSTEM) Palmer Dabbelt <palmer@sifive.com> (supporter:SIFIVE DRIVERS) Paul Walmsley <paul.walmsley@sifive.com> (supporter:SIFIVE DRIVERS) linux-pwm@vger.kernel.org (open list:PWM SUBSYSTEM) linux-riscv@lists.infradead.org (open list:SIFIVE DRIVERS) linux-kernel@vger.kernel.org (open list) Thus Thierry will ultimately be the one responsible for merging this, and linux-pwm@ needs to be cc'ed as well. - Paul
----- On Jul 27, 2019, at 4:56 AM, Paul Walmsley paul.walmsley@sifive.com wrote: > On Fri, 26 Jul 2019, Wang Xiayang wrote: > >> Similar to commit 63fd4b94b948 ("serial: imx: fix error handling >> in console_setup"), as ddata->clk has been explicitly disabled two >> lines above, it should avoid being disabled for the second time. >> clk_unprepare() suits here better. >> >> Signed-off-by: Wang Xiayang <xywang.sjtu@sjtu.edu.cn> > > The patch looks reasonable, but it needs to be sent to other people and > mailing lists. > > Running "scripts/get_maintainer.pl -f drivers/pwm/pwm-sifive.c" shows: > > Thierry Reding <thierry.reding@gmail.com> (maintainer:PWM SUBSYSTEM) > Palmer Dabbelt <palmer@sifive.com> (supporter:SIFIVE DRIVERS) > Paul Walmsley <paul.walmsley@sifive.com> (supporter:SIFIVE DRIVERS) > linux-pwm@vger.kernel.org (open list:PWM SUBSYSTEM) > linux-riscv@lists.infradead.org (open list:SIFIVE DRIVERS) > linux-kernel@vger.kernel.org (open list) > > Thus Thierry will ultimately be the one responsible for merging this, and > linux-pwm@ needs to be cc'ed as well. > > Will do. Thanks for your suggestion.
diff --git a/drivers/pwm/pwm-sifive.c b/drivers/pwm/pwm-sifive.c index a7c107f19e66..00f6fab5bd3b 100644 --- a/drivers/pwm/pwm-sifive.c +++ b/drivers/pwm/pwm-sifive.c @@ -312,7 +312,7 @@ static int pwm_sifive_remove(struct platform_device *dev) if (is_enabled) clk_disable(ddata->clk); - clk_disable_unprepare(ddata->clk); + clk_unprepare(ddata->clk); ret = pwmchip_remove(&ddata->chip); clk_notifier_unregister(ddata->clk, &ddata->notifier);
Similar to commit 63fd4b94b948 ("serial: imx: fix error handling in console_setup"), as ddata->clk has been explicitly disabled two lines above, it should avoid being disabled for the second time. clk_unprepare() suits here better. Signed-off-by: Wang Xiayang <xywang.sjtu@sjtu.edu.cn> --- drivers/pwm/pwm-sifive.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)