Skip to contentSkip to conversation

clk: renesas: r9a06g032: use for_each_compatible_node()

PATCH In review Yang Yingliang 2 participants 2 messages Aug 2, 2023 – Aug 17, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clk: renesas: r9a06g032: use for_each_compatible_node()

Use for_each_compatible_node() instead of open-coding it.

---
 drivers/clk/renesas/r9a06g032-clocks.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/clk/renesas/r9a06g032-clocks.c +2 -3
index 55db63c7041a..9a50166c02b9 100644
@@ -1269,11 +1269,10 @@ static void r9a06g032_clocks_del_clk_provider(void *data)
 
 static void __init r9a06g032_init_h2mode(struct r9a06g032_priv *clocks)
 {
-	struct device_node *usbf_np = NULL;
+	struct device_node *usbf_np;
 	u32 usb;
 
-	while ((usbf_np = of_find_compatible_node(usbf_np, NULL,
-						  "renesas,rzn1-usbf"))) {
+	for_each_compatible_node(usbf_np, NULL, "renesas,rzn1-usbf") {
 		if (of_device_is_available(usbf_np))
 			break;
 	}
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 3 lines · Yang Yingliang

Use for_each_compatible_node() instead of open-coding it.

i.e. will queue in renesas-clk-for-v6.7.

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds