summaryrefslogtreecommitdiff
path: root/kernel/power/power.h
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-05-26 13:40:47 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-05-26 13:40:47 +0200
commit27ddcc6596e50cb8f03d2e83248897667811d8f6 (patch)
tree59ea73e4c3999bcb8519cdc1d5cfd695a3c019ea /kernel/power/power.h
parentf71495f3f0c5f0801823d1235b271a4a415d3df8 (diff)
PM / sleep: Add state field to pm_states[] entries
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>
Diffstat (limited to 'kernel/power/power.h')
-rw-r--r--kernel/power/power.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/kernel/power/power.h b/kernel/power/power.h
index 15f37ea08719..99539c5da844 100644
--- a/kernel/power/power.h
+++ b/kernel/power/power.h
@@ -178,8 +178,13 @@ extern void swsusp_show_speed(struct timeval *, struct timeval *,
unsigned int, char *);
#ifdef CONFIG_SUSPEND
+struct pm_sleep_state {
+ const char *label;
+ suspend_state_t state;
+};
+
/* kernel/power/suspend.c */
-extern const char *const pm_states[];
+extern struct pm_sleep_state pm_states[];
extern bool valid_state(suspend_state_t state);
extern int suspend_devices_and_enter(suspend_state_t state);