2016-11-02 17:24:21

by Masahiro Yamada

[permalink] [raw]
Subject: [PATCH] mtd: nand: denali_dt: replace clk_disable() with clk_disable_unprepare()

The denali_dt_probe() calls clk_disable_unprepare() in the bailout
path, whereas denali_dt_remove calls clk_disable(), inconsistently.
Replace the latter with clk_disable_unprepare() to make sure to
unprepare the clock.

Signed-off-by: Masahiro Yamada <[email protected]>
---

drivers/mtd/nand/denali_dt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/denali_dt.c b/drivers/mtd/nand/denali_dt.c
index 0cb1e8d..f821dc1 100644
--- a/drivers/mtd/nand/denali_dt.c
+++ b/drivers/mtd/nand/denali_dt.c
@@ -110,7 +110,7 @@ static int denali_dt_remove(struct platform_device *ofdev)
struct denali_dt *dt = platform_get_drvdata(ofdev);

denali_remove(&dt->denali);
- clk_disable(dt->clk);
+ clk_disable_unprepare(dt->clk);

return 0;
}
--
1.9.1


2016-11-05 07:36:31

by Marek Vasut

[permalink] [raw]
Subject: Re: [PATCH] mtd: nand: denali_dt: replace clk_disable() with clk_disable_unprepare()

On 11/02/2016 06:21 PM, Masahiro Yamada wrote:
> The denali_dt_probe() calls clk_disable_unprepare() in the bailout
> path, whereas denali_dt_remove calls clk_disable(), inconsistently.
> Replace the latter with clk_disable_unprepare() to make sure to
> unprepare the clock.
>
> Signed-off-by: Masahiro Yamada <[email protected]>

Reviewed-by: Marek Vasut <[email protected]>

> ---
>
> drivers/mtd/nand/denali_dt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/nand/denali_dt.c b/drivers/mtd/nand/denali_dt.c
> index 0cb1e8d..f821dc1 100644
> --- a/drivers/mtd/nand/denali_dt.c
> +++ b/drivers/mtd/nand/denali_dt.c
> @@ -110,7 +110,7 @@ static int denali_dt_remove(struct platform_device *ofdev)
> struct denali_dt *dt = platform_get_drvdata(ofdev);
>
> denali_remove(&dt->denali);
> - clk_disable(dt->clk);
> + clk_disable_unprepare(dt->clk);
>
> return 0;
> }
>


--
Best regards,
Marek Vasut

2016-11-06 22:55:56

by Boris Brezillon

[permalink] [raw]
Subject: Re: [PATCH] mtd: nand: denali_dt: replace clk_disable() with clk_disable_unprepare()

On Thu, 3 Nov 2016 02:21:04 +0900
Masahiro Yamada <[email protected]> wrote:

> The denali_dt_probe() calls clk_disable_unprepare() in the bailout
> path, whereas denali_dt_remove calls clk_disable(), inconsistently.
> Replace the latter with clk_disable_unprepare() to make sure to
> unprepare the clock.
>
> Signed-off-by: Masahiro Yamada <[email protected]>

Applied.

Thanks,

Boris

> ---
>
> drivers/mtd/nand/denali_dt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/nand/denali_dt.c b/drivers/mtd/nand/denali_dt.c
> index 0cb1e8d..f821dc1 100644
> --- a/drivers/mtd/nand/denali_dt.c
> +++ b/drivers/mtd/nand/denali_dt.c
> @@ -110,7 +110,7 @@ static int denali_dt_remove(struct platform_device *ofdev)
> struct denali_dt *dt = platform_get_drvdata(ofdev);
>
> denali_remove(&dt->denali);
> - clk_disable(dt->clk);
> + clk_disable_unprepare(dt->clk);
>
> return 0;
> }