diff options
author | Rob Herring <robh@kernel.org> | 2018-12-05 20:50:46 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2018-12-06 10:54:54 +0100 |
commit | 157ab88ef64a2edccd722f120464109ceba9bac1 (patch) | |
tree | 7ae227477e0e95cfbac7a8afeba70a6f5d720a2b /sound/ppc/tumbler.c | |
parent | ALSA: aoa: Remove direct OF name and type accesses (diff) | |
download | linux-157ab88ef64a2edccd722f120464109ceba9bac1.tar.xz linux-157ab88ef64a2edccd722f120464109ceba9bac1.zip |
ALSA: aoa: Use of_node_name_eq for node name comparisons
Convert string compares of DT node names to use of_node_name_eq helper
instead. This removes direct access to the node name pointer.
A couple of open coded iterating thru the child node names are converted
to use for_each_child_of_node() instead.
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/ppc/tumbler.c')
-rw-r--r-- | sound/ppc/tumbler.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/ppc/tumbler.c b/sound/ppc/tumbler.c index 0779a2912237..6d7ffffcce95 100644 --- a/sound/ppc/tumbler.c +++ b/sound/ppc/tumbler.c @@ -1365,8 +1365,8 @@ int snd_pmac_tumbler_init(struct snd_pmac *chip) mix->anded_reset = 0; mix->reset_on_sleep = 1; - for (np = chip->node->child; np; np = np->sibling) { - if (!strcmp(np->name, "sound")) { + for_each_child_of_node(chip->node, np) { + if (of_node_name_eq(np, "sound")) { if (of_get_property(np, "has-anded-reset", NULL)) mix->anded_reset = 1; if (of_get_property(np, "layout-id", NULL)) |