• Rafael J. Wysocki's avatar
    PM / wakeup: Fix up wakeup_source_report_event() · 60d4553b
    Rafael J. Wysocki authored
    Commit 8a537ece (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: 8a537ece (PM / wakeup: Integrate mechanism to abort transitions in progress)
    Reported-by: default avatarDavid E. Box <david.e.box@linux.intel.com>
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    60d4553b
wakeup.c 28.2 KB