diff options
Diffstat (limited to 'drivers/acpi/sleep/main.c')
-rw-r--r-- | drivers/acpi/sleep/main.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/acpi/sleep/main.c b/drivers/acpi/sleep/main.c index 37a0930fc0a6..f8c63410bcbf 100644 --- a/drivers/acpi/sleep/main.c +++ b/drivers/acpi/sleep/main.c | |||
@@ -168,9 +168,18 @@ int acpi_suspend(u32 acpi_state) | |||
168 | 168 | ||
169 | static int acpi_pm_state_valid(suspend_state_t pm_state) | 169 | static int acpi_pm_state_valid(suspend_state_t pm_state) |
170 | { | 170 | { |
171 | u32 acpi_state = acpi_suspend_states[pm_state]; | 171 | u32 acpi_state; |
172 | |||
173 | switch (pm_state) { | ||
174 | case PM_SUSPEND_ON: | ||
175 | case PM_SUSPEND_STANDBY: | ||
176 | case PM_SUSPEND_MEM: | ||
177 | acpi_state = acpi_suspend_states[pm_state]; | ||
172 | 178 | ||
173 | return sleep_states[acpi_state]; | 179 | return sleep_states[acpi_state]; |
180 | default: | ||
181 | return 0; | ||
182 | } | ||
174 | } | 183 | } |
175 | 184 | ||
176 | static struct pm_ops acpi_pm_ops = { | 185 | static struct pm_ops acpi_pm_ops = { |