PM / Sleep: Print last wakeup source on failed wakeup_count write
[deliverable/linux.git] / drivers / base / power / wakeup.c
index 79715e7fa43e34c9cbf9a4521a657d7bb952f9c6..2d56f4113ae761a406fca80c8d39c892ae4b2416 100644 (file)
@@ -659,7 +659,7 @@ void pm_wakeup_event(struct device *dev, unsigned int msec)
 }
 EXPORT_SYMBOL_GPL(pm_wakeup_event);
 
-static void print_active_wakeup_sources(void)
+void pm_print_active_wakeup_sources(void)
 {
        struct wakeup_source *ws;
        int active = 0;
@@ -683,6 +683,7 @@ static void print_active_wakeup_sources(void)
                        last_activity_ws->name);
        rcu_read_unlock();
 }
+EXPORT_SYMBOL_GPL(pm_print_active_wakeup_sources);
 
 /**
  * pm_wakeup_pending - Check if power transition in progress should be aborted.
@@ -707,8 +708,10 @@ bool pm_wakeup_pending(void)
        }
        spin_unlock_irqrestore(&events_lock, flags);
 
-       if (ret)
-               print_active_wakeup_sources();
+       if (ret) {
+               pr_info("PM: Wakeup pending, aborting suspend\n");
+               pm_print_active_wakeup_sources();
+       }
 
        return ret;
 }
This page took 0.028309 seconds and 5 git commands to generate.