From: Roger Quadros <rogerq@ti.com>
To: Chuhong Yuan <hslester96@gmail.com>
Cc: Kishon Vijay Abraham I <kishon@ti.com>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] phy: ti-pipe3: fix missed clk_disable_unprepare in remove
Date: Wed, 4 Dec 2019 10:39:47 +0200 [thread overview]
Message-ID: <3384e4e0-d3d0-1ab0-f631-8b1dfdc5705a@ti.com> (raw)
In-Reply-To: <20191204072540.1452-1-hslester96@gmail.com>
Hi Chuhong,
On 04/12/2019 09:25, Chuhong Yuan wrote:
> The driver calls clk_prepare_enable in probe but forgets to call
> clk_disable_unprepare in remove.
> Add the missed call to fix it.
>
> Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
> ---
> drivers/phy/ti/phy-ti-pipe3.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/phy/ti/phy-ti-pipe3.c b/drivers/phy/ti/phy-ti-pipe3.c
> index edd6859afba8..19fd1005a440 100644
> --- a/drivers/phy/ti/phy-ti-pipe3.c
> +++ b/drivers/phy/ti/phy-ti-pipe3.c
> @@ -850,6 +850,12 @@ static int ti_pipe3_probe(struct platform_device *pdev)
>
> static int ti_pipe3_remove(struct platform_device *pdev)
> {
> + struct ti_pipe3 *phy = platform_get_drvdata(pdev);
> +
> + if (phy->mode == PIPE3_MODE_SATA) {
> + clk_disable_unprepare(phy->refclk);
> + phy->sata_refclk_enabled = false;
> + }
In fact we are doing an additional disable in ti_pipe3_disable_clocks()
for SATA case.
I think that piece of code should removed if you implement it in
ti_pipe3_remove().
Also commit log should be updated accordingly.
> pm_runtime_disable(&pdev->dev);
>
> return 0;
>
--
cheers,
-roger
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
prev parent reply other threads:[~2019-12-04 8:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-04 7:25 [PATCH] phy: ti-pipe3: fix missed clk_disable_unprepare in remove Chuhong Yuan
2019-12-04 8:39 ` Roger Quadros [this message]
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=3384e4e0-d3d0-1ab0-f631-8b1dfdc5705a@ti.com \
--to=rogerq@ti.com \
--cc=hslester96@gmail.com \
--cc=kishon@ti.com \
--cc=linux-kernel@vger.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 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).