Thread (31 messages) 31 messages, 6 authors, 2023-01-17
STALE1272d
Revisions (3)
  1. v1 current
  2. v2 [diff vs current]
  3. v3 [diff vs current]

[PATCH v1 04/20] ARM: imx6q: use of_clk_get_by_name() instead of_clk_get() to get ptp clock

From: Oleksij Rempel <o.rempel@pengutronix.de>
Date: 2023-01-13 14:35:42
Also in: linux-clk, lkml, netdev
Subsystem: arm port, the rest · Maintainers: Russell King, Linus Torvalds

It is not clear from the code what clock should be taken. So, make sure it
is readable and no other clock will be taken by accident.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
 arch/arm/mach-imx/mach-imx6q.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c
index 7f6200925752..4885d3dfcf7f 100644
--- a/arch/arm/mach-imx/mach-imx6q.c
+++ b/arch/arm/mach-imx/mach-imx6q.c
@@ -98,7 +98,7 @@ static void __init imx6q_1588_init(void)
 	if (!IS_ERR(fec_enet_ref))
 		goto put_node;
 
-	ptp_clk = of_clk_get(np, 2);
+	ptp_clk = of_clk_get_by_name(np, "ptp");
 	if (IS_ERR(ptp_clk)) {
 		pr_warn("%s: failed to get ptp clock\n", __func__);
 		goto put_node;
-- 
2.30.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help