forked from luck/tmp_suning_uos_patched
PM: Rename hibernation_ops to platform_hibernation_ops
Rename 'struct hibernation_ops' to 'struct platform_hibernation_ops' in analogy with 'struct platform_suspend_ops'. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Pavel Machek <pavel@ucw.cz> Cc: Len Brown <lenb@kernel.org> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
74f270af0c
commit
b3dac3b304
|
@ -282,7 +282,7 @@ static void acpi_hibernation_restore_cleanup(void)
|
||||||
acpi_hw_enable_all_runtime_gpes();
|
acpi_hw_enable_all_runtime_gpes();
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct hibernation_ops acpi_hibernation_ops = {
|
static struct platform_hibernation_ops acpi_hibernation_ops = {
|
||||||
.start = acpi_hibernation_start,
|
.start = acpi_hibernation_start,
|
||||||
.pre_snapshot = acpi_hibernation_prepare,
|
.pre_snapshot = acpi_hibernation_prepare,
|
||||||
.finish = acpi_hibernation_finish,
|
.finish = acpi_hibernation_finish,
|
||||||
|
|
|
@ -127,7 +127,7 @@ extern void drain_local_pages(void);
|
||||||
extern void mark_free_pages(struct zone *zone);
|
extern void mark_free_pages(struct zone *zone);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct hibernation_ops - hibernation platform support
|
* struct platform_hibernation_ops - hibernation platform support
|
||||||
*
|
*
|
||||||
* The methods in this structure allow a platform to override the default
|
* The methods in this structure allow a platform to override the default
|
||||||
* mechanism of shutting down the machine during a hibernation transition.
|
* mechanism of shutting down the machine during a hibernation transition.
|
||||||
|
@ -164,7 +164,7 @@ extern void mark_free_pages(struct zone *zone);
|
||||||
* Called right after the nonboot CPUs have been enabled and before
|
* Called right after the nonboot CPUs have been enabled and before
|
||||||
* thawing devices (runs with IRQs on).
|
* thawing devices (runs with IRQs on).
|
||||||
*/
|
*/
|
||||||
struct hibernation_ops {
|
struct platform_hibernation_ops {
|
||||||
int (*start)(void);
|
int (*start)(void);
|
||||||
int (*pre_snapshot)(void);
|
int (*pre_snapshot)(void);
|
||||||
void (*finish)(void);
|
void (*finish)(void);
|
||||||
|
@ -190,14 +190,14 @@ extern void swsusp_set_page_free(struct page *);
|
||||||
extern void swsusp_unset_page_free(struct page *);
|
extern void swsusp_unset_page_free(struct page *);
|
||||||
extern unsigned long get_safe_page(gfp_t gfp_mask);
|
extern unsigned long get_safe_page(gfp_t gfp_mask);
|
||||||
|
|
||||||
extern void hibernation_set_ops(struct hibernation_ops *ops);
|
extern void hibernation_set_ops(struct platform_hibernation_ops *ops);
|
||||||
extern int hibernate(void);
|
extern int hibernate(void);
|
||||||
#else /* CONFIG_HIBERNATION */
|
#else /* CONFIG_HIBERNATION */
|
||||||
static inline int swsusp_page_is_forbidden(struct page *p) { return 0; }
|
static inline int swsusp_page_is_forbidden(struct page *p) { return 0; }
|
||||||
static inline void swsusp_set_page_free(struct page *p) {}
|
static inline void swsusp_set_page_free(struct page *p) {}
|
||||||
static inline void swsusp_unset_page_free(struct page *p) {}
|
static inline void swsusp_unset_page_free(struct page *p) {}
|
||||||
|
|
||||||
static inline void hibernation_set_ops(struct hibernation_ops *ops) {}
|
static inline void hibernation_set_ops(struct platform_hibernation_ops *ops) {}
|
||||||
static inline int hibernate(void) { return -ENOSYS; }
|
static inline int hibernate(void) { return -ENOSYS; }
|
||||||
#endif /* CONFIG_HIBERNATION */
|
#endif /* CONFIG_HIBERNATION */
|
||||||
|
|
||||||
|
|
|
@ -45,14 +45,14 @@ enum {
|
||||||
|
|
||||||
static int hibernation_mode = HIBERNATION_SHUTDOWN;
|
static int hibernation_mode = HIBERNATION_SHUTDOWN;
|
||||||
|
|
||||||
static struct hibernation_ops *hibernation_ops;
|
static struct platform_hibernation_ops *hibernation_ops;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* hibernation_set_ops - set the global hibernate operations
|
* hibernation_set_ops - set the global hibernate operations
|
||||||
* @ops: the hibernation operations to use in subsequent hibernation transitions
|
* @ops: the hibernation operations to use in subsequent hibernation transitions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void hibernation_set_ops(struct hibernation_ops *ops)
|
void hibernation_set_ops(struct platform_hibernation_ops *ops)
|
||||||
{
|
{
|
||||||
if (ops && !(ops->start && ops->pre_snapshot && ops->finish
|
if (ops && !(ops->start && ops->pre_snapshot && ops->finish
|
||||||
&& ops->prepare && ops->enter && ops->pre_restore
|
&& ops->prepare && ops->enter && ops->pre_restore
|
||||||
|
|
Loading…
Reference in New Issue
Block a user