Commit 0528415e authored by Patrick Mochel's avatar Patrick Mochel

[power] Whitespace fixes.

From the -test4-mm5 tree.
parent d168c5dc
......@@ -3,7 +3,7 @@
*
* Copyright (c) 2003 Patrick Mochel
* Copyright (c) 2003 Open Source Development Lab
*
*
* This file is release under the GPLv2
*
*/
......@@ -36,7 +36,7 @@ extern long sys_sync(void);
* @mode: Suspend-to-disk mode
*
* Use the platform driver, if configured so, and return gracefully if it
* fails.
* fails.
* Otherwise, try to power off and reboot. If they fail, halt the machine,
* there ain't no turning back.
*/
......@@ -75,7 +75,7 @@ static int in_suspend __nosavedata = 0;
*
* ... but do not OOM-kill anyone
*
* Notice: all userland should be stopped at this point, or
* Notice: all userland should be stopped at this point, or
* livelock is possible.
*/
......@@ -143,7 +143,7 @@ static int prepare(void)
/**
* pm_suspend_disk - The granpappy of power management.
*
*
* If we're going through the firmware, then get it over with quickly.
*
* If not, then call swsusp to do it's thing, then figure out how
......@@ -169,8 +169,8 @@ int pm_suspend_disk(void)
pr_debug("PM: writing image.\n");
/*
* FIXME: Leftover from swsusp. Are they necessary?
/*
* FIXME: Leftover from swsusp. Are they necessary?
*/
mb();
barrier();
......@@ -192,11 +192,11 @@ int pm_suspend_disk(void)
/**
* pm_resume - Resume from a saved image.
*
* Called as a late_initcall (so all devices are discovered and
* Called as a late_initcall (so all devices are discovered and
* initialized), we call swsusp to see if we have a saved image or not.
* If so, we quiesce devices, the restore the saved image. We will
* return above (in pm_suspend_disk() ) if everything goes well.
* Otherwise, we fail gracefully and return to the normally
* If so, we quiesce devices, the restore the saved image. We will
* return above (in pm_suspend_disk() ) if everything goes well.
* Otherwise, we fail gracefully and return to the normally
* scheduled program.
*
*/
......@@ -219,8 +219,8 @@ static int pm_resume(void)
mb();
local_irq_disable();
/* FIXME: The following (comment and mdelay()) are from swsusp.
* Are they really necessary?
/* FIXME: The following (comment and mdelay()) are from swsusp.
* Are they really necessary?
*
* We do not want some readahead with DMA to corrupt our memory, right?
* Do it with disabled interrupts for best effect. That way, if some
......@@ -254,19 +254,19 @@ static char * pm_disk_modes[] = {
/**
* disk - Control suspend-to-disk mode
*
* Suspend-to-disk can be handled in several ways. The greatest
* Suspend-to-disk can be handled in several ways. The greatest
* distinction is who writes memory to disk - the firmware or the OS.
* If the firmware does it, we assume that it also handles suspending
* If the firmware does it, we assume that it also handles suspending
* the system.
* If the OS does it, then we have three options for putting the system
* to sleep - using the platform driver (e.g. ACPI or other PM registers),
* powering off the system or rebooting the system (for testing).
* powering off the system or rebooting the system (for testing).
*
* The system will support either 'firmware' or 'platform', and that is
* known a priori (and encoded in pm_ops). But, the user may choose
* 'shutdown' or 'reboot' as alternatives.
*
* show() will display what the mode is currently set to.
* show() will display what the mode is currently set to.
* store() will accept one of
*
* 'firmware'
......@@ -301,7 +301,7 @@ static ssize_t disk_store(struct subsystem * s, const char * buf, size_t n)
if (mode == PM_DISK_SHUTDOWN || mode == PM_DISK_REBOOT)
pm_disk_mode = mode;
else {
if (pm_ops && pm_ops->enter &&
if (pm_ops && pm_ops->enter &&
(mode == pm_ops->pm_disk_mode))
pm_disk_mode = mode;
else
......
......@@ -472,7 +472,7 @@ static int suspend_prepare_image(void)
/**
* suspend_save_image - Prepare and write saved image to swap.
*
* IRQs are re-enabled here so we can resume devices and safely write
* IRQs are re-enabled here so we can resume devices and safely write
* to the swap devices. We disable them again before we leave.
*
* The second lock_swapdevices() will unlock ignored swap devices since
......@@ -509,7 +509,7 @@ int swsusp_resume(void)
return 0;
}
/* swsusp_arch_suspend() is implemented in arch/?/power/swsusp.S,
/* swsusp_arch_suspend() is implemented in arch/?/power/swsusp.S,
and basically does:
if (!resume) {
......@@ -535,7 +535,7 @@ int swsusp_suspend(void)
if (!error)
error = suspend_save_image();
if (error) {
printk(KERN_EMERG "%sSuspend failed, trying to recover...\n",
printk(KERN_EMERG "%sSuspend failed, trying to recover...\n",
name_suspend);
barrier();
mb();
......@@ -677,10 +677,10 @@ static struct block_device * resume_bdev;
/**
* Using bio to read from swap.
* Using bio to read from swap.
* This code requires a bit more work than just using buffer heads
* but, it is the recommended way for 2.5/2.6.
* The following are to signal the beginning and end of I/O. Bios
* but, it is the recommended way for 2.5/2.6.
* The following are to signal the beginning and end of I/O. Bios
* finish asynchronously, while we want them to happen synchronously.
* A simple atomic_t, and a wait loop take care of this problem.
*/
......@@ -713,8 +713,8 @@ static void wait_io(void)
* @page: page we're reading or writing.
*
* Straight from the textbook - allocate and initialize the bio.
* If we're writing, make sure the page is marked as dirty.
* Then submit it and wait.
* If we're writing, make sure the page is marked as dirty.
* Then submit it and wait.
*/
static int submit(int rw, pgoff_t page_off, void * page)
......@@ -778,8 +778,8 @@ static int __init read_suspend_image(void)
if ((error = read_page(0, cur)))
goto Done;
/*
* We have to read next position before we overwrite it
/*
* We have to read next position before we overwrite it
*/
next = next_entry(cur);
......@@ -883,7 +883,7 @@ int swsusp_save(void)
*
* swsusp_arch_suspend(0) returns after system is resumed.
*
* swsusp_arch_suspend() copies all "used" memory to "free" memory,
* swsusp_arch_suspend() copies all "used" memory to "free" memory,
* then unsuspends all device drivers, and writes memory to disk
* using normal kernel mechanism.
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment