PM: Separate hibernation code from suspend code
authorRafael J. Wysocki <rjw@sisk.pl>
Wed, 9 May 2007 09:33:18 +0000 (02:33 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 9 May 2007 19:30:48 +0000 (12:30 -0700)
commita3d25c275d383975504dc53c25b691df59bd3c48
tree161a2ae12a20a630c2f639e144872db2b92eb098
parentd60846c4d16f9518b098b905af2b87cb6bf6dc42
PM: Separate hibernation code from suspend code

[ With Johannes Berg <johannes@sipsolutions.net> ]

Separate the hibernation (aka suspend to disk code) from the other suspend
code.  In particular:

 * Remove the definitions related to hibernation from include/linux/pm.h
 * Introduce struct hibernation_ops and a new hibernate() function to hibernate
   the system, defined in include/linux/suspend.h
 * Separate suspend code in kernel/power/main.c from hibernation-related code
   in kernel/power/disk.c and kernel/power/user.c (with the help of
   hibernation_ops)
 * Switch ACPI (the only user of pm_ops.pm_disk_mode) to hibernation_ops

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Greg KH <greg@kroah.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Nigel Cunningham <nigel@nigel.suspend2.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Documentation/power/userland-swsusp.txt
drivers/acpi/sleep/main.c
drivers/acpi/sleep/proc.c
drivers/i2c/chips/tps65010.c
include/linux/pm.h
include/linux/suspend.h
kernel/power/disk.c
kernel/power/main.c
kernel/power/power.h
kernel/power/user.c
kernel/sys.c