PM / sleep: Add state field to pm_states[] entries
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 26 May 2014 11:40:47 +0000 (13:40 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 5 Oct 2014 21:54:15 +0000 (14:54 -0700)
commite89547b87ae44b464fef54572d29c0cd32cb9caa
tree265017471708b5bf4f95279b8b653fd06d6ca919
parenta1b7f13b63e431c141715ecc183d92409982ed63
PM / sleep: Add state field to pm_states[] entries

commit 27ddcc6596e50cb8f03d2e83248897667811d8f6 upstream.

To allow sleep states corresponding to the "mem", "standby" and
"freeze" lables to be different from the pm_states[] indexes of
those strings, introduce struct pm_sleep_state, consisting of
a string label and a state number, and turn pm_states[] into an
array of objects of that type.

This modification should not lead to any functional changes.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/power/main.c
kernel/power/power.h
kernel/power/suspend.c
kernel/power/suspend_test.c