X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=include%2Flinux%2Fsuspend.h;h=a6977423baf737ed67d4847cdce4c89fc24452e0;hb=008238b54ac2350babf195084ecedbcf7851a202;hp=a0b1dbb5919fb72de7f8bf4a2c973bf0d218b7fd;hpb=c697eecebc6cfc0b393afea3c4ff1a5041526ad1;p=safe%2Fjmp%2Flinux-2.6 diff --git a/include/linux/suspend.h b/include/linux/suspend.h index a0b1dbb..a697742 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h @@ -12,11 +12,22 @@ #include #if defined(CONFIG_PM_SLEEP) && defined(CONFIG_VT) && defined(CONFIG_VT_CONSOLE) +extern void pm_set_vt_switch(int); extern int pm_prepare_console(void); extern void pm_restore_console(void); #else -static inline int pm_prepare_console(void) { return 0; } -static inline void pm_restore_console(void) {} +static inline void pm_set_vt_switch(int do_switch) +{ +} + +static inline int pm_prepare_console(void) +{ + return 0; +} + +static inline void pm_restore_console(void) +{ +} #endif typedef int __bitwise suspend_state_t; @@ -130,20 +141,22 @@ struct pbe { }; /* mm/page_alloc.c */ -extern void drain_local_pages(void); extern void mark_free_pages(struct zone *zone); /** * struct platform_hibernation_ops - hibernation platform support * - * The methods in this structure allow a platform to override the default - * mechanism of shutting down the machine during a hibernation transition. + * The methods in this structure allow a platform to carry out special + * operations required by it during a hibernation transition. * - * All three methods must be assigned. + * All the methods below must be implemented. * - * @start: Tell the platform driver that we're starting hibernation. + * @begin: Tell the platform driver that we're starting hibernation. * Called right after shrinking memory and before freezing devices. * + * @end: Called by the PM core right after resuming devices, to indicate to + * the platform that the system has returned to the working state. + * * @pre_snapshot: Prepare the platform for creating the hibernation image. * Called right after devices have been frozen and before the nonboot * CPUs are disabled (runs with IRQs on). @@ -178,7 +191,8 @@ extern void mark_free_pages(struct zone *zone); * thawing devices (runs with IRQs on). */ struct platform_hibernation_ops { - int (*start)(void); + int (*begin)(void); + void (*end)(void); int (*pre_snapshot)(void); void (*finish)(void); int (*prepare)(void);