From: Wolfram Sang <wsa@the-dreams.de>
To: Chuhong Yuan <hslester96@gmail.com>, Dong Aisheng <aisheng.dong@nxp.com>
Cc: Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
NXP Linux Team <linux-imx@nxp.com>,
linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] i2c: imx-lpi2c: add clk_disable_unprepare calls
Date: Sun, 22 Mar 2020 17:19:23 +0100 [thread overview]
Message-ID: <20200322161923.GC6766@ninjato> (raw)
In-Reply-To: <20191102062149.3957-1-hslester96@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1357 bytes --]
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@gmail.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
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Wolfram Sang <wsa@the-dreams.de>
To: Chuhong Yuan <hslester96@gmail.com>, Dong Aisheng <aisheng.dong@nxp.com>
Cc: Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
linux-kernel@vger.kernel.org, NXP Linux Team <linux-imx@nxp.com>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org
Subject: Re: [PATCH v2] i2c: imx-lpi2c: add clk_disable_unprepare calls
Date: Sun, 22 Mar 2020 17:19:23 +0100 [thread overview]
Message-ID: <20200322161923.GC6766@ninjato> (raw)
In-Reply-To: <20191102062149.3957-1-hslester96@gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 1357 bytes --]
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@gmail.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
>
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-03-22 16:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-02 6:21 [PATCH v2] i2c: imx-lpi2c: add clk_disable_unprepare calls Chuhong Yuan
2019-11-02 6:21 ` Chuhong Yuan
2019-11-02 6:21 ` Chuhong Yuan
2020-03-22 16:19 ` Wolfram Sang [this message]
2020-03-22 16:19 ` Wolfram Sang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200322161923.GC6766@ninjato \
--to=wsa@the-dreams.de \
--cc=aisheng.dong@nxp.com \
--cc=festevam@gmail.com \
--cc=hslester96@gmail.com \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.