From: Rafael J. Wysocki Some platforms, particularly in the ARM tree, require that suspend_set_ops() and pm_suspend() be defined even if CONFIG_PM is not set. Make this requirement be satisfied. Signed-off-by: Rafael J. Wysocki Acked-by: Pavel Machek Cc: Len Brown Cc: Greg KH Cc: Russell King Signed-off-by: Andrew Morton --- include/linux/suspend.h | 7 +++++++ 1 files changed, 7 insertions(+) diff -puN include/linux/suspend.h~pm-fix-compilation-of-suspend-code-if-config_pm-is-unset include/linux/suspend.h --- a/include/linux/suspend.h~pm-fix-compilation-of-suspend-code-if-config_pm-is-unset +++ a/include/linux/suspend.h @@ -79,6 +79,7 @@ struct platform_suspend_ops { extern struct platform_suspend_ops *suspend_ops; +#ifdef CONFIG_PM /** * suspend_set_ops - set platform dependent suspend operations * @ops: The new suspend operations to set. @@ -105,6 +106,12 @@ extern void arch_suspend_disable_irqs(vo extern void arch_suspend_enable_irqs(void); extern int pm_suspend(suspend_state_t state); +#else /* CONFIG_PM */ +#define suspend_valid_only_mem NULL + +static inline void suspend_set_ops(struct platform_suspend_ops *ops) {} +static inline int pm_suspend(suspend_state_t state) { return -ENOSYS; } +#endif /* CONFIG_PM */ /* struct pbe is used for creating lists of pages that should be restored * atomically during the resume from disk, because the page frames they have _