kernel/arch/sparc/kernel/reboot.c
.. .. @@ -7,6 +7,7 @@ 7 7 #include <linux/reboot.h> 8 8 #include <linux/export.h> 9 9 #include <linux/pm.h> 10 +#include <linux/of.h>10 11 11 12 #include <asm/oplib.h> 12 13 #include <asm/prom.h> .. .. @@ -25,7 +26,7 @@ 25 26 26 27 void machine_power_off(void) 27 28 { 28 - if (strcmp(of_console_device->type, "serial") || scons_pwroff)29 + if (!of_node_is_type(of_console_device, "serial") || scons_pwroff)29 30 prom_halt_power_off(); 30 31 31 32 prom_halt();