• Rafael J. Wysocki's avatar
    PM / wakeup: Set power.can_wakeup if wakeup_sysfs_add() fails · 820b9b0c
    Rafael J. Wysocki authored
    Currently, an error from wakeup_sysfs_add() in
    device_set_wakeup_capable() causes the device's power.can_wakeup
    flag to remain unset even though the device technically is capable
    of signaling wakeup.
    
    If wakeup_sysfs_add() fails user space may not be able to enable
    the device to wake up the system from sleep states, but at least
    for some devices that does not matter.
    
    For this reason, set or clear power.can_wakeup upfront and if
    wakeup_sysfs_add() returns an error, print a message to the log.
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    820b9b0c
wakeup.c 28.6 KB