lkml.org 
[lkml]   [2022]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH -next] ALSA: ppc: tumbler: use for_each_child_of_node() macro
Date
Use for_each_child_of_node() macro instead of open coding it.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
sound/ppc/tumbler.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sound/ppc/tumbler.c b/sound/ppc/tumbler.c
index c65e74d7cd0a..c7e150f82bcc 100644
--- a/sound/ppc/tumbler.c
+++ b/sound/ppc/tumbler.c
@@ -1060,8 +1060,7 @@ static struct device_node *find_audio_device(const char *name)
if (! gpiop)
return NULL;

- for (np = of_get_next_child(gpiop, NULL); np;
- np = of_get_next_child(gpiop, np)) {
+ for_each_child_of_node(gpiop, np) {
const char *property = of_get_property(np, "audio-gpio", NULL);
if (property && strcmp(property, name) == 0)
break;
--
2.25.1
\
 
 \ /
  Last update: 2022-05-12 10:29    [W:0.060 / U:2.536 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site