linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [v2 PATCH 1/4] phy: phy-mtk-tphy: get optional clock by devm_clk_get_optional()
@ 2019-04-10  6:13 Chunfeng Yun
  2019-04-10  6:13 ` [v2 PATCH 2/4] phy: qcom-qusb2: " Chunfeng Yun
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Chunfeng Yun @ 2019-04-10  6:13 UTC (permalink / raw)
  To: Kishon Vijay Abraham I
  Cc: Kevin Hilman, Chunfeng Yun, Matthias Brugger, Andy Gross,
	David Brown, Masahiro Yamada, Martin Blumenstingl,
	Grygorii Strashko, Kunihiko Hayashi, Masami Hiramatsu,
	Motoya Tanigawa, linux-kernel, linux-arm-kernel, linux-amlogic,
	linux-mediatek, linux-arm-msm

Use devm_clk_get_optional() to get optional clock

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
v2: no changes
---
 drivers/phy/mediatek/phy-mtk-tphy.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/phy/mediatek/phy-mtk-tphy.c b/drivers/phy/mediatek/phy-mtk-tphy.c
index 5b6a470ca145..cb2ed3b25068 100644
--- a/drivers/phy/mediatek/phy-mtk-tphy.c
+++ b/drivers/phy/mediatek/phy-mtk-tphy.c
@@ -1103,13 +1103,9 @@ static int mtk_tphy_probe(struct platform_device *pdev)
 	}
 
 	/* it's deprecated, make it optional for backward compatibility */
-	tphy->u3phya_ref = devm_clk_get(dev, "u3phya_ref");
-	if (IS_ERR(tphy->u3phya_ref)) {
-		if (PTR_ERR(tphy->u3phya_ref) == -EPROBE_DEFER)
-			return -EPROBE_DEFER;
-
-		tphy->u3phya_ref = NULL;
-	}
+	tphy->u3phya_ref = devm_clk_get_optional(dev, "u3phya_ref");
+	if (IS_ERR(tphy->u3phya_ref))
+		return PTR_ERR(tphy->u3phya_ref);
 
 	tphy->src_ref_clk = U3P_REF_CLK;
 	tphy->src_coef = U3P_SLEW_RATE_COEF;
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-04-11  1:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-10  6:13 [v2 PATCH 1/4] phy: phy-mtk-tphy: get optional clock by devm_clk_get_optional() Chunfeng Yun
2019-04-10  6:13 ` [v2 PATCH 2/4] phy: qcom-qusb2: " Chunfeng Yun
2019-04-10  6:13 ` [v2 PATCH 3/4] phy: socionext: " Chunfeng Yun
2019-04-10  6:13 ` [v2 PATCH 4/4] phy: phy-meson-gxl-usb2: " Chunfeng Yun
2019-04-10  8:18   ` Jerome Brunet
2019-04-10 17:59   ` Martin Blumenstingl
2019-04-11  1:04     ` Chunfeng Yun

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).