summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorenzo Colitti <lorenzo@google.com>2014-11-27 15:12:10 +0900
committerJohn Stultz <john.stultz@linaro.org>2016-02-16 13:53:39 -0800
commit49f054b7c5fc79fc33560f623f7a2f2bbd92cf08 (patch)
treeecf87b1e9dd3f68f635892875beb277274f12cdf
parentdd0c7788b67fed52d2d2b9893f7290e3c63757b8 (diff)
Make suspend abort reason logging depend on CONFIG_PM_SLEEP
This unbreaks the build on architectures such as um that do not support CONFIG_PM_SLEEP. Change-Id: Ia846ed0a7fca1d762ececad20748d23610e8544f Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
-rw-r--r--kernel/power/process.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/power/process.c b/kernel/power/process.c
index 37eac4066e71..e7f1f736a5b6 100644
--- a/kernel/power/process.c
+++ b/kernel/power/process.c
@@ -36,7 +36,9 @@ static int try_to_freeze_tasks(bool user_only)
unsigned int elapsed_msecs;
bool wakeup = false;
int sleep_usecs = USEC_PER_MSEC;
+#ifdef CONFIG_PM_SLEEP
char suspend_abort[MAX_SUSPEND_ABORT_LEN];
+#endif
do_gettimeofday(&start);
@@ -66,9 +68,11 @@ static int try_to_freeze_tasks(bool user_only)
break;
if (pm_wakeup_pending()) {
+#ifdef CONFIG_PM_SLEEP
pm_get_active_wakeup_sources(suspend_abort,
MAX_SUSPEND_ABORT_LEN);
log_suspend_abort_reason(suspend_abort);
+#endif
wakeup = true;
break;
}