aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/power/hibernate.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2011-04-26 13:15:07 -0400
committerRafael J. Wysocki <rjw@sisk.pl>2011-05-11 15:37:15 -0400
commit2e711c04dbbf7a7732a3f7073b1fc285d12b369d (patch)
treedbc06a3fff744144d7937a205a91fd8ce71585d4 /kernel/power/hibernate.c
parentf5a592f7d74e38c5007876c731e6bf5580072e63 (diff)
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>
Diffstat (limited to 'kernel/power/hibernate.c')
-rw-r--r--kernel/power/hibernate.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
index 50aae660174d..554d3b049f35 100644
--- a/kernel/power/hibernate.c
+++ b/kernel/power/hibernate.c
@@ -272,12 +272,7 @@ static int create_image(int platform_mode)
272 272
273 local_irq_disable(); 273 local_irq_disable();
274 274
275 error = sysdev_suspend(PMSG_FREEZE); 275 error = syscore_suspend();
276 if (!error) {
277 error = syscore_suspend();
278 if (error)
279 sysdev_resume();
280 }
281 if (error) { 276 if (error) {
282 printk(KERN_ERR "PM: Some system devices failed to power down, " 277 printk(KERN_ERR "PM: Some system devices failed to power down, "
283 "aborting hibernation\n"); 278 "aborting hibernation\n");
@@ -302,7 +297,6 @@ static int create_image(int platform_mode)
302 297
303 Power_up: 298 Power_up:
304 syscore_resume(); 299 syscore_resume();
305 sysdev_resume();
306 /* NOTE: dpm_resume_noirq() is just a resume() for devices 300 /* NOTE: dpm_resume_noirq() is just a resume() for devices
307 * that suspended with irqs off ... no overall powerup. 301 * that suspended with irqs off ... no overall powerup.
308 */ 302 */
@@ -409,12 +403,7 @@ static int resume_target_kernel(bool platform_mode)
409 403
410 local_irq_disable(); 404 local_irq_disable();
411 405
412 error = sysdev_suspend(PMSG_QUIESCE); 406 error = syscore_suspend();
413 if (!error) {
414 error = syscore_suspend();
415 if (error)
416 sysdev_resume();
417 }
418 if (error) 407 if (error)
419 goto Enable_irqs; 408 goto Enable_irqs;
420 409
@@ -442,7 +431,6 @@ static int resume_target_kernel(bool platform_mode)
442 touch_softlockup_watchdog(); 431 touch_softlockup_watchdog();
443 432
444 syscore_resume(); 433 syscore_resume();
445 sysdev_resume();
446 434
447 Enable_irqs: 435 Enable_irqs:
448 local_irq_enable(); 436 local_irq_enable();
@@ -528,7 +516,6 @@ int hibernation_platform_enter(void)
528 goto Platform_finish; 516 goto Platform_finish;
529 517
530 local_irq_disable(); 518 local_irq_disable();
531 sysdev_suspend(PMSG_HIBERNATE);
532 syscore_suspend(); 519 syscore_suspend();
533 if (pm_wakeup_pending()) { 520 if (pm_wakeup_pending()) {
534 error = -EAGAIN; 521 error = -EAGAIN;
@@ -541,7 +528,6 @@ int hibernation_platform_enter(void)
541 528
542 Power_up: 529 Power_up:
543 syscore_resume(); 530 syscore_resume();
544 sysdev_resume();
545 local_irq_enable(); 531 local_irq_enable();
546 enable_nonboot_cpus(); 532 enable_nonboot_cpus();
547 533