summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2024-05-30 11:19:29 +0200
committerGeert Uytterhoeven <geert+renesas@glider.be>2024-06-07 14:12:10 +0200
commitf07a320691348b75436be7b958884da7095b1386 (patch)
tree5493d40c743a5fff71bcc8c75f0d59d0ecf37c4b /drivers
parentc45c3f5f9593915da78cda923e7163a8d00db60c (diff)
pinctrl: renesas: rzn1: Use for_each_child_of_node_scoped()
Use the scoped variant of for_each_child_of_node() to simplify the code. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/c0a28f466c42d5d59c7fadfa1fd05fd512d43b6f.1717060708.git.geert+renesas@glider.be
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pinctrl/renesas/pinctrl-rzn1.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/pinctrl/renesas/pinctrl-rzn1.c b/drivers/pinctrl/renesas/pinctrl-rzn1.c
index e1b4203c66c6..39af1fe79c84 100644
--- a/drivers/pinctrl/renesas/pinctrl-rzn1.c
+++ b/drivers/pinctrl/renesas/pinctrl-rzn1.c
@@ -737,13 +737,12 @@ static int rzn1_pinctrl_parse_groups(struct device_node *np,
static int rzn1_pinctrl_count_function_groups(struct device_node *np)
{
- struct device_node *child;
int count = 0;
if (of_property_count_u32_elems(np, RZN1_PINS_PROP) > 0)
count++;
- for_each_child_of_node(np, child) {
+ for_each_child_of_node_scoped(np, child) {
if (of_property_count_u32_elems(child, RZN1_PINS_PROP) > 0)
count++;
}