ANDROID: power: Provide dummy log_suspend_abort_reason() if SUSPEND is disabled
The API to log the suspend reason was introduced with commit 57caa2ad5ce3 ("power: Adds functionality to log the last suspend abort reason."). It is called from functions enabled with PM_SLEEP and from functions enabled with SUSPEND, but only available if SUSPEND is enabled. This can result in build failures such as the following if PM_SLEEP is enabled, but SUSPEND is not. kernel/built-in.o: In function `try_to_freeze_tasks': process.c:(.text+0x30928): undefined reference to `log_suspend_abort_reason' drivers/built-in.o: In function `syscore_suspend': (.text+0x6e250): undefined reference to `log_suspend_abort_reason' drivers/built-in.o: In function `__device_suspend': main.c:(.text+0x7a528): undefined reference to `log_suspend_abort_reason' Fixes: 57caa2ad5ce3 ("power: Adds functionality to log the last suspend abort reason.") Signed-off-by: Guenter Roeck <groeck@chromium.org>
This commit is contained in:
parent
a4912d5074
commit
7961972600
1 changed files with 6 additions and 1 deletions
|
@ -21,7 +21,12 @@
|
||||||
#define MAX_SUSPEND_ABORT_LEN 256
|
#define MAX_SUSPEND_ABORT_LEN 256
|
||||||
|
|
||||||
void log_wakeup_reason(int irq);
|
void log_wakeup_reason(int irq);
|
||||||
void log_suspend_abort_reason(const char *fmt, ...);
|
|
||||||
int check_wakeup_reason(int irq);
|
int check_wakeup_reason(int irq);
|
||||||
|
|
||||||
|
#ifdef CONFIG_SUSPEND
|
||||||
|
void log_suspend_abort_reason(const char *fmt, ...);
|
||||||
|
#else
|
||||||
|
static inline void log_suspend_abort_reason(const char *fmt, ...) { }
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* _LINUX_WAKEUP_REASON_H */
|
#endif /* _LINUX_WAKEUP_REASON_H */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue