PM: Remove sysdev suspend, resume and shutdown operations

Since suspend, resume and shutdown operations in struct sysdev_class
and struct sysdev_driver are not used any more, remove them.  Also
drop sysdev_suspend(), sysdev_resume() and sysdev_shutdown() used
for executing those operations and modify all of their users
accordingly.  This reduces kernel code size quite a bit and reduces
its complexity.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Rafael J. Wysocki 2011-04-26 19:15:07 +02:00
parent f5a592f7d7
commit 2e711c04db
14 changed files with 7 additions and 282 deletions

View file

@ -272,12 +272,7 @@ static int create_image(int platform_mode)
local_irq_disable();
error = sysdev_suspend(PMSG_FREEZE);
if (!error) {
error = syscore_suspend();
if (error)
sysdev_resume();
}
error = syscore_suspend();
if (error) {
printk(KERN_ERR "PM: Some system devices failed to power down, "
"aborting hibernation\n");
@ -302,7 +297,6 @@ static int create_image(int platform_mode)
Power_up:
syscore_resume();
sysdev_resume();
/* NOTE: dpm_resume_noirq() is just a resume() for devices
* that suspended with irqs off ... no overall powerup.
*/
@ -409,12 +403,7 @@ static int resume_target_kernel(bool platform_mode)
local_irq_disable();
error = sysdev_suspend(PMSG_QUIESCE);
if (!error) {
error = syscore_suspend();
if (error)
sysdev_resume();
}
error = syscore_suspend();
if (error)
goto Enable_irqs;
@ -442,7 +431,6 @@ static int resume_target_kernel(bool platform_mode)
touch_softlockup_watchdog();
syscore_resume();
sysdev_resume();
Enable_irqs:
local_irq_enable();
@ -528,7 +516,6 @@ int hibernation_platform_enter(void)
goto Platform_finish;
local_irq_disable();
sysdev_suspend(PMSG_HIBERNATE);
syscore_suspend();
if (pm_wakeup_pending()) {
error = -EAGAIN;
@ -541,7 +528,6 @@ int hibernation_platform_enter(void)
Power_up:
syscore_resume();
sysdev_resume();
local_irq_enable();
enable_nonboot_cpus();