]> git.karo-electronics.de Git - karo-tx-linux.git/commit
PM / wakeup: Fix up wakeup_source_report_event()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sun, 14 May 2017 00:23:04 +0000 (02:23 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sun, 14 May 2017 00:23:04 +0000 (02:23 +0200)
commit60d4553bdc1a0099adb544e12cafd7bbc7f1d484
treec4ef46914be48152938d27899b72ebcfd5f9bb33
parenteed4d47efe9508b855b09754cf6de4325d8a2f0d
PM / wakeup: Fix up wakeup_source_report_event()

Commit 8a537ece3d94 (PM / wakeup: Integrate mechanism to abort
transitions in progress) modified wakeup_source_report_event()
and wakeup_source_activate() to make it possible to call
pm_system_wakeup() from the latter if so indicated by the
caller of the former (via a new function argument added by that
commit), but it overlooked the fact that in some situations
wakeup_source_report_event() is called to signal a "hard" event
(ie. such that should abort a system suspend in progress) after
pm_stay_awake() has been called for the same wakeup source object,
in which case the pm_system_wakeup() will not trigger.

To work around this issue, modify wakeup_source_activate() and
wakeup_source_report_event() again so that pm_system_wakeup() is
called by the latter directly (if its last argument is true), in
which case the additional argument does not need to be passed
to wakeup_source_activate() any more, so drop it from there.

Fixes: 8a537ece3d94 (PM / wakeup: Integrate mechanism to abort transitions in progress)
Reported-by: David E. Box <david.e.box@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/power/wakeup.c