linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next v2] mtd: st_spi_fsm: add missing clk_disable_unprepare() in stfsm_remove()
@ 2022-05-16  9:29 Yang Yingliang
  2022-05-16 16:43 ` Miquel Raynal
  0 siblings, 1 reply; 2+ messages in thread
From: Yang Yingliang @ 2022-05-16  9:29 UTC (permalink / raw)
  To: linux-kernel, linux-mtd; +Cc: miquel.raynal, richard, vigneshr

Clock source is prepared and enabled by clk_prepare_enable()
in probe function, but not disabled or unprepared in remove
function.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
v2:
  make the commit message and title more proper.
---
 drivers/mtd/devices/st_spi_fsm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/mtd/devices/st_spi_fsm.c b/drivers/mtd/devices/st_spi_fsm.c
index 983999c020d6..d3377b10fc0f 100644
--- a/drivers/mtd/devices/st_spi_fsm.c
+++ b/drivers/mtd/devices/st_spi_fsm.c
@@ -2126,6 +2126,8 @@ static int stfsm_remove(struct platform_device *pdev)
 {
 	struct stfsm *fsm = platform_get_drvdata(pdev);
 
+	clk_disable_unprepare(fsm->clk);
+
 	return mtd_device_unregister(&fsm->mtd);
 }
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH -next v2] mtd: st_spi_fsm: add missing clk_disable_unprepare() in stfsm_remove()
  2022-05-16  9:29 [PATCH -next v2] mtd: st_spi_fsm: add missing clk_disable_unprepare() in stfsm_remove() Yang Yingliang
@ 2022-05-16 16:43 ` Miquel Raynal
  0 siblings, 0 replies; 2+ messages in thread
From: Miquel Raynal @ 2022-05-16 16:43 UTC (permalink / raw)
  To: Yang Yingliang; +Cc: linux-kernel, linux-mtd, richard, vigneshr

Hi Yang,

yangyingliang@huawei.com wrote on Mon, 16 May 2022 17:29:11 +0800:

> Clock source is prepared and enabled by clk_prepare_enable()
> in probe function, but not disabled or unprepared in remove
> function.
> 

Applied to mtd/next, thanks!

> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---
> v2:
>   make the commit message and title more proper.
> ---
>  drivers/mtd/devices/st_spi_fsm.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/mtd/devices/st_spi_fsm.c b/drivers/mtd/devices/st_spi_fsm.c
> index 983999c020d6..d3377b10fc0f 100644
> --- a/drivers/mtd/devices/st_spi_fsm.c
> +++ b/drivers/mtd/devices/st_spi_fsm.c
> @@ -2126,6 +2126,8 @@ static int stfsm_remove(struct platform_device *pdev)
>  {
>  	struct stfsm *fsm = platform_get_drvdata(pdev);
>  
> +	clk_disable_unprepare(fsm->clk);
> +
>  	return mtd_device_unregister(&fsm->mtd);
>  }
>  


Thanks,
Miquèl

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-16 16:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-16  9:29 [PATCH -next v2] mtd: st_spi_fsm: add missing clk_disable_unprepare() in stfsm_remove() Yang Yingliang
2022-05-16 16:43 ` Miquel Raynal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).