diff options
| -rw-r--r-- | drivers/base/power/wakeup.c | 5 | ||||
| -rw-r--r-- | include/linux/suspend.h | 1 | ||||
| -rw-r--r-- | kernel/power/main.c | 2 |
3 files changed, 6 insertions, 2 deletions
diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c index 407a2efa10bb..2d56f4113ae7 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) | |||
| 659 | } | 659 | } |
| 660 | EXPORT_SYMBOL_GPL(pm_wakeup_event); | 660 | EXPORT_SYMBOL_GPL(pm_wakeup_event); |
| 661 | 661 | ||
| 662 | static void print_active_wakeup_sources(void) | 662 | void pm_print_active_wakeup_sources(void) |
| 663 | { | 663 | { |
| 664 | struct wakeup_source *ws; | 664 | struct wakeup_source *ws; |
| 665 | int active = 0; | 665 | int active = 0; |
| @@ -683,6 +683,7 @@ static void print_active_wakeup_sources(void) | |||
| 683 | last_activity_ws->name); | 683 | last_activity_ws->name); |
| 684 | rcu_read_unlock(); | 684 | rcu_read_unlock(); |
| 685 | } | 685 | } |
| 686 | EXPORT_SYMBOL_GPL(pm_print_active_wakeup_sources); | ||
| 686 | 687 | ||
| 687 | /** | 688 | /** |
| 688 | * pm_wakeup_pending - Check if power transition in progress should be aborted. | 689 | * pm_wakeup_pending - Check if power transition in progress should be aborted. |
| @@ -709,7 +710,7 @@ bool pm_wakeup_pending(void) | |||
| 709 | 710 | ||
| 710 | if (ret) { | 711 | if (ret) { |
| 711 | pr_info("PM: Wakeup pending, aborting suspend\n"); | 712 | pr_info("PM: Wakeup pending, aborting suspend\n"); |
| 712 | print_active_wakeup_sources(); | 713 | pm_print_active_wakeup_sources(); |
| 713 | } | 714 | } |
| 714 | 715 | ||
| 715 | return ret; | 716 | return ret; |
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index d4e3f16d5e89..f73cabf59012 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h | |||
| @@ -363,6 +363,7 @@ extern bool pm_wakeup_pending(void); | |||
| 363 | extern bool pm_get_wakeup_count(unsigned int *count, bool block); | 363 | extern bool pm_get_wakeup_count(unsigned int *count, bool block); |
| 364 | extern bool pm_save_wakeup_count(unsigned int count); | 364 | extern bool pm_save_wakeup_count(unsigned int count); |
| 365 | extern void pm_wakep_autosleep_enabled(bool set); | 365 | extern void pm_wakep_autosleep_enabled(bool set); |
| 366 | extern void pm_print_active_wakeup_sources(void); | ||
| 366 | 367 | ||
| 367 | static inline void lock_system_sleep(void) | 368 | static inline void lock_system_sleep(void) |
| 368 | { | 369 | { |
diff --git a/kernel/power/main.c b/kernel/power/main.c index d77663bfedeb..0828070d38b4 100644 --- a/kernel/power/main.c +++ b/kernel/power/main.c | |||
| @@ -424,6 +424,8 @@ static ssize_t wakeup_count_store(struct kobject *kobj, | |||
| 424 | if (sscanf(buf, "%u", &val) == 1) { | 424 | if (sscanf(buf, "%u", &val) == 1) { |
| 425 | if (pm_save_wakeup_count(val)) | 425 | if (pm_save_wakeup_count(val)) |
| 426 | error = n; | 426 | error = n; |
| 427 | else | ||
| 428 | pm_print_active_wakeup_sources(); | ||
| 427 | } | 429 | } |
| 428 | 430 | ||
| 429 | out: | 431 | out: |
