[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20240822084342.1595239-1-frank.li@vivo.com>
Date: Thu, 22 Aug 2024 02:43:41 -0600
From: Yangtao Li <frank.li@...o.com>
To: vkoul@...nel.org,
kishon@...nel.org,
krzk@...nel.org,
alim.akhtar@...sung.com,
frank.li@...o.com,
konrad.dybcio@...aro.org,
liubo03@...pur.com,
robh@...nel.org,
yuvaraj.cd@...il.com,
ks.giri@...sung.com,
vasanth.a@...sung.com
Cc: linux-arm-msm@...r.kernel.org,
linux-phy@...ts.infradead.org,
linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-samsung-soc@...r.kernel.org
Subject: [PATCH 1/4] phy: ti: phy-dm816x-usb: Convert to devm_clk_get_prepared()
Convert devm_clk_get(), clk_prepare() to a single
call to devm_clk_get_prepared(), as this is exactly
what this function does.
Signed-off-by: Yangtao Li <frank.li@...o.com>
---
drivers/phy/ti/phy-dm816x-usb.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/phy/ti/phy-dm816x-usb.c b/drivers/phy/ti/phy-dm816x-usb.c
index d5ae972a31fb..d47674ec5e96 100644
--- a/drivers/phy/ti/phy-dm816x-usb.c
+++ b/drivers/phy/ti/phy-dm816x-usb.c
@@ -215,12 +215,9 @@ static int dm816x_usb_phy_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, phy);
- phy->refclk = devm_clk_get(phy->dev, "refclk");
+ phy->refclk = devm_clk_get_prepared(phy->dev, "refclk");
if (IS_ERR(phy->refclk))
return PTR_ERR(phy->refclk);
- error = clk_prepare(phy->refclk);
- if (error)
- return error;
pm_runtime_enable(phy->dev);
generic_phy = devm_phy_create(phy->dev, NULL, &ops);
@@ -244,7 +241,6 @@ static int dm816x_usb_phy_probe(struct platform_device *pdev)
clk_unprepare:
pm_runtime_disable(phy->dev);
- clk_unprepare(phy->refclk);
return error;
}
@@ -254,7 +250,6 @@ static void dm816x_usb_phy_remove(struct platform_device *pdev)
usb_remove_phy(&phy->phy);
pm_runtime_disable(phy->dev);
- clk_unprepare(phy->refclk);
}
static struct platform_driver dm816x_usb_phy_driver = {
--
2.39.0
Powered by blists - more mailing lists