Commit 313ba573 authored by Patrick Mochel's avatar Patrick Mochel

[acpi] Always handle requests for entering S4, not just for S4bios.

parent 4db33583
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
u8 sleep_states[ACPI_S_STATE_COUNT]; u8 sleep_states[ACPI_S_STATE_COUNT];
static struct pm_ops acpi_pm_ops;
extern void do_suspend_lowlevel_s4bios(int); extern void do_suspend_lowlevel_s4bios(int);
extern void do_suspend_lowlevel(int); extern void do_suspend_lowlevel(int);
...@@ -85,6 +87,7 @@ static int acpi_pm_enter(u32 state) ...@@ -85,6 +87,7 @@ static int acpi_pm_enter(u32 state)
{ {
acpi_status status = AE_OK; acpi_status status = AE_OK;
unsigned long flags = 0; unsigned long flags = 0;
u32 acpi_state = acpi_suspend_states[state];
ACPI_FLUSH_CPU_CACHE(); ACPI_FLUSH_CPU_CACHE();
local_irq_save(flags); local_irq_save(flags);
...@@ -92,7 +95,7 @@ static int acpi_pm_enter(u32 state) ...@@ -92,7 +95,7 @@ static int acpi_pm_enter(u32 state)
{ {
case PM_SUSPEND_STANDBY: case PM_SUSPEND_STANDBY:
barrier(); barrier();
status = acpi_enter_sleep_state(acpi_suspend_states[state]); status = acpi_enter_sleep_state(acpi_state);
break; break;
case PM_SUSPEND_MEM: case PM_SUSPEND_MEM:
...@@ -100,6 +103,9 @@ static int acpi_pm_enter(u32 state) ...@@ -100,6 +103,9 @@ static int acpi_pm_enter(u32 state)
break; break;
case PM_SUSPEND_DISK: case PM_SUSPEND_DISK:
if (acpi_pm_ops.pm_disk_mode == PM_DISK_PLATFORM)
status = acpi_enter_sleep_state(acpi_state);
else
do_suspend_lowlevel_s4bios(0); do_suspend_lowlevel_s4bios(0);
break; break;
default: default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment