| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Windfarm PowerMac thermal control. SMU based controls |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * (c) Copyright 2005 Benjamin Herrenschmidt, IBM Corp. |
|---|
| 5 | 6 | * <benh@kernel.crashing.org> |
|---|
| 6 | | - * |
|---|
| 7 | | - * Released under the term of the GNU GPL v2. |
|---|
| 8 | 7 | */ |
|---|
| 9 | 8 | |
|---|
| 10 | 9 | #include <linux/types.h> |
|---|
| .. | .. |
|---|
| 267 | 266 | |
|---|
| 268 | 267 | /* Look for RPM fans */ |
|---|
| 269 | 268 | for (fans = NULL; (fans = of_get_next_child(smu, fans)) != NULL;) |
|---|
| 270 | | - if (!strcmp(fans->name, "rpm-fans") || |
|---|
| 269 | + if (of_node_name_eq(fans, "rpm-fans") || |
|---|
| 271 | 270 | of_device_is_compatible(fans, "smu-rpm-fans")) |
|---|
| 272 | 271 | break; |
|---|
| 273 | 272 | for (fan = NULL; |
|---|
| .. | .. |
|---|
| 277 | 276 | fct = smu_fan_create(fan, 0); |
|---|
| 278 | 277 | if (fct == NULL) { |
|---|
| 279 | 278 | printk(KERN_WARNING "windfarm: Failed to create SMU " |
|---|
| 280 | | - "RPM fan %s\n", fan->name); |
|---|
| 279 | + "RPM fan %pOFn\n", fan); |
|---|
| 281 | 280 | continue; |
|---|
| 282 | 281 | } |
|---|
| 283 | 282 | list_add(&fct->link, &smu_fans); |
|---|
| .. | .. |
|---|
| 287 | 286 | |
|---|
| 288 | 287 | /* Look for PWM fans */ |
|---|
| 289 | 288 | for (fans = NULL; (fans = of_get_next_child(smu, fans)) != NULL;) |
|---|
| 290 | | - if (!strcmp(fans->name, "pwm-fans")) |
|---|
| 289 | + if (of_node_name_eq(fans, "pwm-fans")) |
|---|
| 291 | 290 | break; |
|---|
| 292 | 291 | for (fan = NULL; |
|---|
| 293 | 292 | fans && (fan = of_get_next_child(fans, fan)) != NULL;) { |
|---|
| .. | .. |
|---|
| 296 | 295 | fct = smu_fan_create(fan, 1); |
|---|
| 297 | 296 | if (fct == NULL) { |
|---|
| 298 | 297 | printk(KERN_WARNING "windfarm: Failed to create SMU " |
|---|
| 299 | | - "PWM fan %s\n", fan->name); |
|---|
| 298 | + "PWM fan %pOFn\n", fan); |
|---|
| 300 | 299 | continue; |
|---|
| 301 | 300 | } |
|---|
| 302 | 301 | list_add(&fct->link, &smu_fans); |
|---|