[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200322161923.GC6766@ninjato>
Date: Sun, 22 Mar 2020 17:19:23 +0100
From: Wolfram Sang <wsa@...-dreams.de>
To: Chuhong Yuan <hslester96@...il.com>,
Dong Aisheng <aisheng.dong@....com>
Cc: Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>,
NXP Linux Team <linux-imx@....com>,
linux-i2c@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] i2c: imx-lpi2c: add clk_disable_unprepare calls
On Sat, Nov 02, 2019 at 02:21:49PM +0800, Chuhong Yuan wrote:
> The driver forgets to call clk_disable_unprepare when probe fails
> and remove.
> Add the two calls to fix the problem.
>
> Signed-off-by: Chuhong Yuan <hslester96@...il.com>
> ---
Dong Aisheng, what do you think of this patch?
> Changes in v2:
> - Adjust the call order to make it consistent in probe failure and
> removal.
>
> drivers/i2c/busses/i2c-imx-lpi2c.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/i2c/busses/i2c-imx-lpi2c.c b/drivers/i2c/busses/i2c-imx-lpi2c.c
> index c92b56485fa6..f964693c0901 100644
> --- a/drivers/i2c/busses/i2c-imx-lpi2c.c
> +++ b/drivers/i2c/busses/i2c-imx-lpi2c.c
> @@ -618,6 +618,7 @@ static int lpi2c_imx_probe(struct platform_device *pdev)
> return 0;
>
> rpm_disable:
> + clk_disable_unprepare(lpi2c_imx->clk);
> pm_runtime_put(&pdev->dev);
> pm_runtime_disable(&pdev->dev);
> pm_runtime_dont_use_autosuspend(&pdev->dev);
> @@ -630,6 +631,7 @@ static int lpi2c_imx_remove(struct platform_device *pdev)
> struct lpi2c_imx_struct *lpi2c_imx = platform_get_drvdata(pdev);
>
> i2c_del_adapter(&lpi2c_imx->adapter);
> + clk_disable_unprepare(lpi2c_imx->clk);
>
> pm_runtime_disable(&pdev->dev);
> pm_runtime_dont_use_autosuspend(&pdev->dev);
> --
> 2.23.0
>
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists