aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/base/power/wakeup.c5
-rw-r--r--include/linux/suspend.h1
-rw-r--r--kernel/power/main.c2
3 files changed, 6 insertions, 2 deletions
diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c
index 407a2efa10b..2d56f4113ae 100644
--- a/drivers/base/power/wakeup.c
+++ b/drivers/base/power/wakeup.c
@@ -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.
@@ -709,7 +710,7 @@ bool pm_wakeup_pending(void)
if (ret) {
pr_info("PM: Wakeup pending, aborting suspend\n");
- print_active_wakeup_sources();
+ pm_print_active_wakeup_sources();
}
return ret;
diff --git a/include/linux/suspend.h b/include/linux/suspend.h
index d4e3f16d5e8..f73cabf5901 100644
--- a/include/linux/suspend.h
+++ b/include/linux/suspend.h
@@ -363,6 +363,7 @@ extern bool pm_wakeup_pending(void);
extern bool pm_get_wakeup_count(unsigned int *count, bool block);
extern bool pm_save_wakeup_count(unsigned int count);
extern void pm_wakep_autosleep_enabled(bool set);
+extern void pm_print_active_wakeup_sources(void);
static inline void lock_system_sleep(void)
{
diff --git a/kernel/power/main.c b/kernel/power/main.c
index d77663bfede..0828070d38b 100644
--- a/kernel/power/main.c
+++ b/kernel/power/main.c
@@ -424,6 +424,8 @@ static ssize_t wakeup_count_store(struct kobject *kobj,
if (sscanf(buf, "%u", &val) == 1) {
if (pm_save_wakeup_count(val))
error = n;
+ else
+ pm_print_active_wakeup_sources();
}
out: