diff options
author | Rob Herring <robh@kernel.org> | 2018-12-05 22:50:46 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2018-12-06 12:54:54 +0300 |
commit | 157ab88ef64a2edccd722f120464109ceba9bac1 (patch) | |
tree | 7ae227477e0e95cfbac7a8afeba70a6f5d720a2b /sound/ppc/pmac.c | |
parent | 192a7122954001af2504a9abecfc0ad28532a6ee (diff) | |
download | linux-157ab88ef64a2edccd722f120464109ceba9bac1.tar.xz |
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/pmac.c')
-rw-r--r-- | sound/ppc/pmac.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/ppc/pmac.c b/sound/ppc/pmac.c index 48dd44f8e914..d692e4070167 100644 --- a/sound/ppc/pmac.c +++ b/sound/ppc/pmac.c @@ -908,7 +908,7 @@ static void detect_byte_swap(struct snd_pmac *chip) /* if seems that Keylargo can't byte-swap */ for (mio = chip->node->parent; mio; mio = mio->parent) { - if (strcmp(mio->name, "mac-io") == 0) { + if (of_node_name_eq(mio, "mac-io")) { if (of_device_is_compatible(mio, "Keylargo")) chip->can_byte_swap = 0; break; @@ -1313,7 +1313,7 @@ int snd_pmac_new(struct snd_card *card, struct snd_pmac **chip_return) } else if (chip->is_pbook_G3) { struct device_node* mio; for (mio = chip->node->parent; mio; mio = mio->parent) { - if (strcmp(mio->name, "mac-io") == 0) { + if (of_node_name_eq(mio, "mac-io")) { struct resource r; if (of_address_to_resource(mio, 0, &r) == 0) chip->macio_base = |