diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2023-08-02 17:19:20 +0800 |
---|---|---|
committer | Geert Uytterhoeven <geert+renesas@glider.be> | 2023-09-11 13:18:30 +0200 |
commit | f3ea14c6a243d927c172caf123e9d2ce803fdafc (patch) | |
tree | e1eac2efa1c79957b6ea2e3c230c2de243140a82 /drivers | |
parent | 0bb80ecc33a8fb5a682236443c1e740d5c917d1d (diff) | |
download | linux-stable-f3ea14c6a243d927c172caf123e9d2ce803fdafc.tar.gz linux-stable-f3ea14c6a243d927c172caf123e9d2ce803fdafc.tar.bz2 linux-stable-f3ea14c6a243d927c172caf123e9d2ce803fdafc.zip |
clk: renesas: r9a06g032: Use for_each_compatible_node()
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>
Link: https://lore.kernel.org/r/20230802091920.3270703-1-yangyingliang@huawei.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/clk/renesas/r9a06g032-clocks.c | 5 |
1 files changed, 2 insertions, 3 deletions
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; } |