Message ID | 20240829063347.69818-1-linruifeng4@huawei.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [-next] aoa: core: Using helper function for_each_child_of_node() | expand |
diff --git a/sound/aoa/core/gpio-feature.c b/sound/aoa/core/gpio-feature.c index 39bb409b27f6..01060f7c3862 100644 --- a/sound/aoa/core/gpio-feature.c +++ b/sound/aoa/core/gpio-feature.c @@ -72,7 +72,7 @@ static struct device_node *get_gpio(char *name, gpio = of_find_node_by_name(NULL, "gpio"); if (!gpio) return NULL; - while ((np = of_get_next_child(gpio, np))) { + for_each_child_of_node(gpio, np) { audio_gpio = of_get_property(np, "audio-gpio", NULL); if (!audio_gpio) continue;
Helper function for_each_child_of_node() can iterate through the DT node, so we don't need to use while loop. Signed-off-by: Lin Ruifeng <linruifeng4@huawei.com> --- sound/aoa/core/gpio-feature.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)