aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2007-04-30 18:09:53 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-04-30 19:40:40 -0400
commit11d77d0c01b80e44c7aceb21928508dafce774f9 (patch)
tree4952f15df4ea2fcdba824aec5689ee9c0c7ceb90 /kernel
parentfe0c935a6cbf25d72a27c7a345df8a2151de0b74 (diff)
power management: remove firmware disk mode
This patch removes the firmware disk suspend mode which is the wrong approach, it is supposed to be used for implementing firmware-based disk suspend but cannot actually be used for that. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Pavel Machek <pavel@ucw.cz> Cc: <linux-pm@lists.linux-foundation.org> Cc: David Brownell <david-b@pacbell.net> Cc: Len Brown <lenb@kernel.org> Acked-by: Russell King <rmk@arm.linux.org.uk> Cc: Greg KH <greg@kroah.com> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/power/disk.c27
1 files changed, 11 insertions, 16 deletions
diff --git a/kernel/power/disk.c b/kernel/power/disk.c
index 4de2f69fe095..02e4fb69111a 100644
--- a/kernel/power/disk.c
+++ b/kernel/power/disk.c
@@ -122,8 +122,6 @@ static int prepare_processes(void)
122/** 122/**
123 * pm_suspend_disk - The granpappy of hibernation power management. 123 * pm_suspend_disk - The granpappy of hibernation power management.
124 * 124 *
125 * If we're going through the firmware, then get it over with quickly.
126 *
127 * If not, then call swsusp to do its thing, then figure out how 125 * If not, then call swsusp to do its thing, then figure out how
128 * to power down the system. 126 * to power down the system.
129 */ 127 */
@@ -292,7 +290,6 @@ late_initcall(software_resume);
292 290
293 291
294static const char * const pm_disk_modes[] = { 292static const char * const pm_disk_modes[] = {
295 [PM_DISK_FIRMWARE] = "firmware",
296 [PM_DISK_PLATFORM] = "platform", 293 [PM_DISK_PLATFORM] = "platform",
297 [PM_DISK_SHUTDOWN] = "shutdown", 294 [PM_DISK_SHUTDOWN] = "shutdown",
298 [PM_DISK_REBOOT] = "reboot", 295 [PM_DISK_REBOOT] = "reboot",
@@ -303,27 +300,25 @@ static const char * const pm_disk_modes[] = {
303/** 300/**
304 * disk - Control suspend-to-disk mode 301 * disk - Control suspend-to-disk mode
305 * 302 *
306 * Suspend-to-disk can be handled in several ways. The greatest 303 * Suspend-to-disk can be handled in several ways. We have a few options
307 * distinction is who writes memory to disk - the firmware or the OS. 304 * for putting the system to sleep - using the platform driver (e.g. ACPI
308 * If the firmware does it, we assume that it also handles suspending 305 * or other pm_ops), powering off the system or rebooting the system
309 * the system. 306 * (for testing) as well as the two test modes.
310 * If the OS does it, then we have three options for putting the system
311 * to sleep - using the platform driver (e.g. ACPI or other PM registers),
312 * powering off the system or rebooting the system (for testing).
313 * 307 *
314 * The system will support either 'firmware' or 'platform', and that is 308 * The system can support 'platform', and that is known a priori (and
315 * known a priori (and encoded in pm_ops). But, the user may choose 309 * encoded in pm_ops). However, the user may choose 'shutdown' or 'reboot'
316 * 'shutdown' or 'reboot' as alternatives. 310 * as alternatives, as well as the test modes 'test' and 'testproc'.
317 * 311 *
318 * show() will display what the mode is currently set to. 312 * show() will display what the mode is currently set to.
319 * store() will accept one of 313 * store() will accept one of
320 * 314 *
321 * 'firmware'
322 * 'platform' 315 * 'platform'
323 * 'shutdown' 316 * 'shutdown'
324 * 'reboot' 317 * 'reboot'
318 * 'test'
319 * 'testproc'
325 * 320 *
326 * It will only change to 'firmware' or 'platform' if the system 321 * It will only change to 'platform' if the system
327 * supports it (as determined from pm_ops->pm_disk_mode). 322 * supports it (as determined from pm_ops->pm_disk_mode).
328 */ 323 */
329 324
@@ -345,7 +340,7 @@ static ssize_t disk_store(struct subsystem * s, const char * buf, size_t n)
345 len = p ? p - buf : n; 340 len = p ? p - buf : n;
346 341
347 mutex_lock(&pm_mutex); 342 mutex_lock(&pm_mutex);
348 for (i = PM_DISK_FIRMWARE; i < PM_DISK_MAX; i++) { 343 for (i = PM_DISK_PLATFORM; i < PM_DISK_MAX; i++) {
349 if (!strncmp(buf, pm_disk_modes[i], len)) { 344 if (!strncmp(buf, pm_disk_modes[i], len)) {
350 mode = i; 345 mode = i;
351 break; 346 break;