From: Chuhong Yuan <hslester96@gmail.com>
To: unlisted-recipients:; (no To-header on input)
Cc: Kishon Vijay Abraham I <kishon@ti.com>,
Roger Quadros <rogerq@ti.com>,
linux-kernel@vger.kernel.org, Chuhong Yuan <hslester96@gmail.com>
Subject: [PATCH] phy: ti-pipe3: fix missed clk_disable_unprepare in remove
Date: Wed, 4 Dec 2019 15:25:40 +0800 [thread overview]
Message-ID: <20191204072540.1452-1-hslester96@gmail.com> (raw)
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;
+ }
pm_runtime_disable(&pdev->dev);
return 0;
--
2.24.0
next reply other threads:[~2019-12-04 7:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-04 7:25 Chuhong Yuan [this message]
2019-12-04 8:39 ` [PATCH] phy: ti-pipe3: fix missed clk_disable_unprepare in remove Roger Quadros
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=20191204072540.1452-1-hslester96@gmail.com \
--to=hslester96@gmail.com \
--cc=kishon@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rogerq@ti.com \
/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