diff mbox series

[-next] clk: renesas: r9a06g032: use for_each_compatible_node()

Message ID 20230802091920.3270703-1-yangyingliang@huawei.com (mailing list archive)
State Accepted
Delegated to: Geert Uytterhoeven
Headers show
Series [-next] clk: renesas: r9a06g032: use for_each_compatible_node() | expand

Commit Message

Yang Yingliang Aug. 2, 2023, 9:19 a.m. UTC
Use for_each_compatible_node() instead of open-coding it.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 drivers/clk/renesas/r9a06g032-clocks.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Geert Uytterhoeven Aug. 17, 2023, 9:38 a.m. UTC | #1
On Wed, Aug 2, 2023 at 11:22 AM Yang Yingliang <yangyingliang@huawei.com> wrote:
> Use for_each_compatible_node() instead of open-coding it.
>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
i.e. will queue in renesas-clk-for-v6.7.

Gr{oetje,eeting}s,

                        Geert
diff mbox series

Patch

diff --git a/drivers/clk/renesas/r9a06g032-clocks.c b/drivers/clk/renesas/r9a06g032-clocks.c
index 55db63c7041a..9a50166c02b9 100644
--- a/drivers/clk/renesas/r9a06g032-clocks.c
+++ b/drivers/clk/renesas/r9a06g032-clocks.c
@@ -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;
 	}