linux_old1/kernel/power
Geert Uytterhoeven 8cff66791a PM / sleep: Fix test_suspend after sleep state rework
When passing "test_suspend=mem" to the kernel:

    PM: can't test 'mem' suspend state

and the suspend test is not run.

Commit 406e79385f ("PM / sleep: System sleep state selection
interface rework") changed pm_labels[] from a contiguous NULL-terminated
array to a sparse array (with the first element unpopulated), breaking
the assumptions of the iterator in setup_test_suspend().

Iterate from PM_SUSPEND_MIN to PM_SUSPEND_MAX - 1 to fix this.

Fixes: 406e79385f (PM / sleep: System sleep state selection interface rework)
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-02-18 02:16:27 +01:00
..
Kconfig PM / sleep: Increase default DPM watchdog timeout to 120 2016-09-13 02:15:58 +02:00
Makefile PM / Hibernate: Don't let kasan instrument snapshot.c 2016-06-14 00:38:56 +02:00
autosleep.c PM / Sleep: avoid 'autosleep' in shutdown progress 2013-07-15 01:31:37 +02:00
console.c PM / sleep: Make pm_prepare_console() return void 2016-06-15 01:26:04 +02:00
hibernate.c PM / Hibernate: allow hibernation with PAGE_POISONING_ZERO 2016-09-13 02:35:27 +02:00
main.c PM / sleep: System sleep state selection interface rework 2016-11-21 22:45:40 +01:00
power.h PM / sleep: System sleep state selection interface rework 2016-11-21 22:45:40 +01:00
poweroff.c power/sysrq: fix inconstistent help message of sysrq key 2013-04-30 17:04:10 -07:00
process.c oom, suspend: fix oom_killer_disable vs. pm suspend properly 2016-10-07 18:46:27 -07:00
qos.c power, workqueue: remove keventd_up() usage 2016-09-17 13:18:21 -04:00
snapshot.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
suspend.c Revert "PM / sleep / ACPI: Use the ACPI_FADT_LOW_POWER_S0 flag" 2017-01-20 03:33:57 +01:00
suspend_test.c PM / sleep: Fix test_suspend after sleep state rework 2017-02-18 02:16:27 +01:00
swap.c PM / Hibernate: Use rb_entry() instead of container_of() 2017-01-27 11:31:12 +01:00
user.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
wakelock.c PM / autosleep: Use workqueue for user space wakeup sources garbage collector 2015-07-14 21:04:48 +02:00