diff options
author | Rob Herring <robh@kernel.org> | 2018-12-05 22:50:28 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-12-22 13:29:56 +0300 |
commit | f1e0addca8bd7386f8cabbc64c9988fff91c131f (patch) | |
tree | 86accf6f05d6b6e05457436f08783e8f460f494a /drivers/macintosh/windfarm_smu_sensors.c | |
parent | c1fa31b0fc90a80d64a334e5d35dca211f9187f6 (diff) | |
download | linux-f1e0addca8bd7386f8cabbc64c9988fff91c131f.tar.xz |
macintosh: Use of_node_name_{eq, prefix} for node name comparisons
Convert string compares of DT node names to use of_node_name_{eq,prefix}
helpers instead. This removes direct access to the node name pointer.
This changes a single case insensitive node name comparison to case
sensitive for "ata4". This is the only instance of a case insensitive
comparison for all the open coded node name comparisons on powerpc.
Searching the commit history, there doesn't appear to be any reason for
it to be case insensitive.
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: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'drivers/macintosh/windfarm_smu_sensors.c')
-rw-r--r-- | drivers/macintosh/windfarm_smu_sensors.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/macintosh/windfarm_smu_sensors.c b/drivers/macintosh/windfarm_smu_sensors.c index 1ba86de93f92..a58f6733381a 100644 --- a/drivers/macintosh/windfarm_smu_sensors.c +++ b/drivers/macintosh/windfarm_smu_sensors.c @@ -424,7 +424,7 @@ static int __init smu_sensors_init(void) /* Look for sensors subdir */ for (sensors = NULL; (sensors = of_get_next_child(smu, sensors)) != NULL;) - if (!strcmp(sensors->name, "sensors")) + if (of_node_name_eq(sensors, "sensors")) break; of_node_put(smu); |