Loading drivers/acpi/sleep/poweroff.c +9 −6 Original line number Diff line number Diff line Loading @@ -33,9 +33,7 @@ int acpi_sleep_prepare(u32 acpi_state) ACPI_FLUSH_CPU_CACHE(); acpi_enable_wakeup_device_prep(acpi_state); #endif if (acpi_state == ACPI_STATE_S5) { acpi_wakeup_gpe_poweroff_prepare(); } acpi_gpe_sleep_prepare(acpi_state); acpi_enter_sleep_state_prep(acpi_state); return 0; } Loading @@ -53,12 +51,17 @@ void acpi_power_off(void) static int acpi_shutdown(struct sys_device *x) { if (system_state == SYSTEM_POWER_OFF) { /* Prepare if we are going to power off the system */ switch (system_state) { case SYSTEM_POWER_OFF: /* Prepare to power off the system */ return acpi_sleep_prepare(ACPI_STATE_S5); } case SYSTEM_SUSPEND_DISK: /* Prepare to suspend the system to disk */ return acpi_sleep_prepare(ACPI_STATE_S4); default: return 0; } } static struct sysdev_class acpi_sysclass = { set_kset_name("acpi"), Loading drivers/acpi/sleep/sleep.h +1 −1 Original line number Diff line number Diff line Loading @@ -5,4 +5,4 @@ extern int acpi_suspend (u32 state); extern void acpi_enable_wakeup_device_prep(u8 sleep_state); extern void acpi_enable_wakeup_device(u8 sleep_state); extern void acpi_disable_wakeup_device(u8 sleep_state); extern void acpi_wakeup_gpe_poweroff_prepare(void); extern void acpi_gpe_sleep_prepare(u32 sleep_state); drivers/acpi/sleep/wakeup.c +3 −3 Original line number Diff line number Diff line Loading @@ -192,7 +192,7 @@ late_initcall(acpi_wakeup_device_init); * RUNTIME GPEs, we simply mark all GPES that * are not enabled for wakeup from S5 as RUNTIME. */ void acpi_wakeup_gpe_poweroff_prepare(void) void acpi_gpe_sleep_prepare(u32 sleep_state) { struct list_head *node, *next; Loading @@ -201,8 +201,8 @@ void acpi_wakeup_gpe_poweroff_prepare(void) struct acpi_device, wakeup_list); /* The GPE can wakeup system from S5, don't touch it */ if ((u32) dev->wakeup.sleep_state == ACPI_STATE_S5) /* The GPE can wakeup system from this state, don't touch it */ if ((u32) dev->wakeup.sleep_state >= sleep_state) continue; /* acpi_set_gpe_type will automatically disable GPE */ acpi_set_gpe_type(dev->wakeup.gpe_device, Loading include/linux/kernel.h +1 −0 Original line number Diff line number Diff line Loading @@ -181,6 +181,7 @@ extern enum system_states { SYSTEM_HALT, SYSTEM_POWER_OFF, SYSTEM_RESTART, SYSTEM_SUSPEND_DISK, } system_state; #define TAINT_PROPRIETARY_MODULE (1<<0) Loading include/linux/reboot.h +1 −2 Original line number Diff line number Diff line Loading @@ -60,8 +60,7 @@ extern void machine_crash_shutdown(struct pt_regs *); */ extern void kernel_restart_prepare(char *cmd); extern void kernel_halt_prepare(void); extern void kernel_power_off_prepare(void); extern void kernel_shutdown_prepare(enum system_states state); extern void kernel_restart(char *cmd); extern void kernel_halt(void); Loading Loading
drivers/acpi/sleep/poweroff.c +9 −6 Original line number Diff line number Diff line Loading @@ -33,9 +33,7 @@ int acpi_sleep_prepare(u32 acpi_state) ACPI_FLUSH_CPU_CACHE(); acpi_enable_wakeup_device_prep(acpi_state); #endif if (acpi_state == ACPI_STATE_S5) { acpi_wakeup_gpe_poweroff_prepare(); } acpi_gpe_sleep_prepare(acpi_state); acpi_enter_sleep_state_prep(acpi_state); return 0; } Loading @@ -53,12 +51,17 @@ void acpi_power_off(void) static int acpi_shutdown(struct sys_device *x) { if (system_state == SYSTEM_POWER_OFF) { /* Prepare if we are going to power off the system */ switch (system_state) { case SYSTEM_POWER_OFF: /* Prepare to power off the system */ return acpi_sleep_prepare(ACPI_STATE_S5); } case SYSTEM_SUSPEND_DISK: /* Prepare to suspend the system to disk */ return acpi_sleep_prepare(ACPI_STATE_S4); default: return 0; } } static struct sysdev_class acpi_sysclass = { set_kset_name("acpi"), Loading
drivers/acpi/sleep/sleep.h +1 −1 Original line number Diff line number Diff line Loading @@ -5,4 +5,4 @@ extern int acpi_suspend (u32 state); extern void acpi_enable_wakeup_device_prep(u8 sleep_state); extern void acpi_enable_wakeup_device(u8 sleep_state); extern void acpi_disable_wakeup_device(u8 sleep_state); extern void acpi_wakeup_gpe_poweroff_prepare(void); extern void acpi_gpe_sleep_prepare(u32 sleep_state);
drivers/acpi/sleep/wakeup.c +3 −3 Original line number Diff line number Diff line Loading @@ -192,7 +192,7 @@ late_initcall(acpi_wakeup_device_init); * RUNTIME GPEs, we simply mark all GPES that * are not enabled for wakeup from S5 as RUNTIME. */ void acpi_wakeup_gpe_poweroff_prepare(void) void acpi_gpe_sleep_prepare(u32 sleep_state) { struct list_head *node, *next; Loading @@ -201,8 +201,8 @@ void acpi_wakeup_gpe_poweroff_prepare(void) struct acpi_device, wakeup_list); /* The GPE can wakeup system from S5, don't touch it */ if ((u32) dev->wakeup.sleep_state == ACPI_STATE_S5) /* The GPE can wakeup system from this state, don't touch it */ if ((u32) dev->wakeup.sleep_state >= sleep_state) continue; /* acpi_set_gpe_type will automatically disable GPE */ acpi_set_gpe_type(dev->wakeup.gpe_device, Loading
include/linux/kernel.h +1 −0 Original line number Diff line number Diff line Loading @@ -181,6 +181,7 @@ extern enum system_states { SYSTEM_HALT, SYSTEM_POWER_OFF, SYSTEM_RESTART, SYSTEM_SUSPEND_DISK, } system_state; #define TAINT_PROPRIETARY_MODULE (1<<0) Loading
include/linux/reboot.h +1 −2 Original line number Diff line number Diff line Loading @@ -60,8 +60,7 @@ extern void machine_crash_shutdown(struct pt_regs *); */ extern void kernel_restart_prepare(char *cmd); extern void kernel_halt_prepare(void); extern void kernel_power_off_prepare(void); extern void kernel_shutdown_prepare(enum system_states state); extern void kernel_restart(char *cmd); extern void kernel_halt(void); Loading