Skip to content

Commit f07a320

Browse files
committed
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
1 parent c45c3f5 commit f07a320

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

drivers/pinctrl/renesas/pinctrl-rzn1.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -737,13 +737,12 @@ static int rzn1_pinctrl_parse_groups(struct device_node *np,
737737

738738
static int rzn1_pinctrl_count_function_groups(struct device_node *np)
739739
{
740-
struct device_node *child;
741740
int count = 0;
742741

743742
if (of_property_count_u32_elems(np, RZN1_PINS_PROP) > 0)
744743
count++;
745744

746-
for_each_child_of_node(np, child) {
745+
for_each_child_of_node_scoped(np, child) {
747746
if (of_property_count_u32_elems(child, RZN1_PINS_PROP) > 0)
748747
count++;
749748
}

0 commit comments

Comments
 (0)