hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/arch/sparc/kernel/reboot.c
....@@ -7,6 +7,7 @@
77 #include <linux/reboot.h>
88 #include <linux/export.h>
99 #include <linux/pm.h>
10
+#include <linux/of.h>
1011
1112 #include <asm/oplib.h>
1213 #include <asm/prom.h>
....@@ -25,7 +26,7 @@
2526
2627 void machine_power_off(void)
2728 {
28
- if (strcmp(of_console_device->type, "serial") || scons_pwroff)
29
+ if (!of_node_is_type(of_console_device, "serial") || scons_pwroff)
2930 prom_halt_power_off();
3031
3132 prom_halt();