Make suspend abort reason logging depend on CONFIG_PM_SLEEP
authorLorenzo Colitti <lorenzo@google.com>
Thu, 27 Nov 2014 06:12:10 +0000 (15:12 +0900)
committerJP Abgrall <jpa@google.com>
Tue, 2 Dec 2014 21:58:47 +0000 (21:58 +0000)
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>
kernel/power/process.c

index 86a40fa3509526b85b7433e302ab6d16e46575cc..87387b939f1354f200c687b7af01a19756312ed2 100644 (file)
@@ -34,7 +34,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);
 
@@ -64,9 +66,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;
                }