mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
of: Migrate of_find_node_by_name() users to for_each_node_by_name()
There are a bunch of users open coding the for_each_node_by_name() by calling of_find_node_by_name() directly instead of using the macro. This is getting in the way of some cleanups, and the possibility of removing of_find_node_by_name() entirely. Clean it up so that all the users are consistent. Signed-off-by: Grant Likely <[email protected]> Cc: Rob Herring <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: "Rafael J. Wysocki" <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Takashi Iwai <[email protected]>
This commit is contained in:
parent
a752ee56ad
commit
ccdb8ed3b3
10 changed files with 19 additions and 35 deletions
|
|
@ -992,9 +992,9 @@ static int snd_pmac_detect(struct snd_pmac *chip)
|
|||
return -ENODEV;
|
||||
|
||||
if (!sound) {
|
||||
sound = of_find_node_by_name(NULL, "sound");
|
||||
while (sound && sound->parent != chip->node)
|
||||
sound = of_find_node_by_name(sound, "sound");
|
||||
for_each_node_by_name(sound, "sound")
|
||||
if (sound->parent == chip->node)
|
||||
break;
|
||||
}
|
||||
if (! sound) {
|
||||
of_node_put(chip->node);
|
||||
|
|
|
|||
Loading…
Reference in a new issue