summaryrefslogtreecommitdiffstats
path: root/kernel/power
diff options
context:
space:
mode:
authorMagnus Damm <damm@igel.co.jp>2009-05-15 00:53:26 +0200
committerRafael J. Wysocki <rjw@sisk.pl>2009-06-12 21:32:31 +0200
commite39a71ef80877f4e30d808af9acceec80f4d2f7c (patch)
treee9d4ff1618328cf3a3fafee04621b9776ca169de /kernel/power
parent1380a37e3da5d9e14ea5c2a4c6ab2b307a2798ea (diff)
downloadlinux-e39a71ef80877f4e30d808af9acceec80f4d2f7c.tar.bz2
PM: Rename device_power_down/up()
Rename the functions performing "_noirq" dev_pm_ops operations from device_power_down() and device_power_up() to device_suspend_noirq() and device_resume_noirq(). The new function names are chosen to show that the functions are responsible for calling the _noirq() versions to finalize the suspend/resume operation. The current function names do not perform power down/up anymore so the names may be misleading. Global function renames: - device_power_down() -> device_suspend_noirq() - device_power_up() -> device_resume_noirq() Static function renames: - suspend_device_noirq() -> __device_suspend_noirq() - resume_device_noirq() -> __device_resume_noirq() Signed-off-by: Magnus Damm <damm@igel.co.jp> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Acked-by: Len Brown <lenb@kernel.org> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'kernel/power')
-rw-r--r--kernel/power/disk.c16
-rw-r--r--kernel/power/main.c4
2 files changed, 10 insertions, 10 deletions
diff --git a/kernel/power/disk.c b/kernel/power/disk.c
index 5cb080e7eebd..1c18bc894a2d 100644
--- a/kernel/power/disk.c
+++ b/kernel/power/disk.c
@@ -216,12 +216,12 @@ static int create_image(int platform_mode)
return error;
/* At this point, device_suspend() has been called, but *not*
- * device_power_down(). We *must* call device_power_down() now.
+ * device_suspend_noirq(). We *must* call device_suspend_noirq() now.
* Otherwise, drivers for some devices (e.g. interrupt controllers)
* become desynchronized with the actual state of the hardware
* at resume time, and evil weirdness ensues.
*/
- error = device_power_down(PMSG_FREEZE);
+ error = device_suspend_noirq(PMSG_FREEZE);
if (error) {
printk(KERN_ERR "PM: Some devices failed to power down, "
"aborting hibernation\n");
@@ -262,7 +262,7 @@ static int create_image(int platform_mode)
Power_up:
sysdev_resume();
- /* NOTE: device_power_up() is just a resume() for devices
+ /* NOTE: device_resume_noirq() is just a resume() for devices
* that suspended with irqs off ... no overall powerup.
*/
@@ -275,7 +275,7 @@ static int create_image(int platform_mode)
Platform_finish:
platform_finish(platform_mode);
- device_power_up(in_suspend ?
+ device_resume_noirq(in_suspend ?
(error ? PMSG_RECOVER : PMSG_THAW) : PMSG_RESTORE);
return error;
@@ -339,7 +339,7 @@ static int resume_target_kernel(bool platform_mode)
{
int error;
- error = device_power_down(PMSG_QUIESCE);
+ error = device_suspend_noirq(PMSG_QUIESCE);
if (error) {
printk(KERN_ERR "PM: Some devices failed to power down, "
"aborting resume\n");
@@ -394,7 +394,7 @@ static int resume_target_kernel(bool platform_mode)
Cleanup:
platform_restore_cleanup(platform_mode);
- device_power_up(PMSG_RECOVER);
+ device_resume_noirq(PMSG_RECOVER);
return error;
}
@@ -454,7 +454,7 @@ int hibernation_platform_enter(void)
goto Resume_devices;
}
- error = device_power_down(PMSG_HIBERNATE);
+ error = device_suspend_noirq(PMSG_HIBERNATE);
if (error)
goto Resume_devices;
@@ -479,7 +479,7 @@ int hibernation_platform_enter(void)
Platofrm_finish:
hibernation_ops->finish();
- device_power_up(PMSG_RESTORE);
+ device_suspend_noirq(PMSG_RESTORE);
Resume_devices:
entering_platform_hibernation = false;
diff --git a/kernel/power/main.c b/kernel/power/main.c
index 868028280d13..2f6638ee03c0 100644
--- a/kernel/power/main.c
+++ b/kernel/power/main.c
@@ -295,7 +295,7 @@ static int suspend_enter(suspend_state_t state)
return error;
}
- error = device_power_down(PMSG_SUSPEND);
+ error = device_suspend_noirq(PMSG_SUSPEND);
if (error) {
printk(KERN_ERR "PM: Some devices failed to power down\n");
goto Platfrom_finish;
@@ -335,7 +335,7 @@ static int suspend_enter(suspend_state_t state)
suspend_ops->wake();
Power_up_devices:
- device_power_up(PMSG_RESUME);
+ device_resume_noirq(PMSG_RESUME);
Platfrom_finish:
if (suspend_ops->finish)