]> git.baikalelectronics.ru Git - kernel.git/commit
PM / sleep: Fix test_suspend after sleep state rework
authorGeert Uytterhoeven <geert+renesas@glider.be>
Fri, 17 Feb 2017 13:18:44 +0000 (14:18 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 18 Feb 2017 01:16:27 +0000 (02:16 +0100)
commitd33aa651a234af4b3bcb827e22149aee129b6697
treeea6f6398c46c1e2b106feaa858fdff94af8eb6db
parent4a967707bc74179d0d667d4e9fd3f76e3c7db045
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 b5b1ed259327beb1 ("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: b5b1ed259327beb1 (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>
kernel/power/suspend_test.c