This patch (as1381) updates a comment describing the kernel's policy toward enabling wakeup by default. It also makes device_set_wakeup_capable() actually do something when CONFIG_PM isn't enabled. It's not clear this is necessary; however if it isn't then device_init_wakeup() and device_can_wakeup() should also be do-nothing routines. Furthermore, I don't expect this change to have any noticeable effect -- but if it does then clearly the old behavior was wrong. Signed-off-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> CC: David Brownell <david-b@xxxxxxxxxxx> --- Index: usb-2.6/include/linux/pm_wakeup.h =================================================================== --- usb-2.6.orig/include/linux/pm_wakeup.h +++ usb-2.6/include/linux/pm_wakeup.h @@ -27,8 +27,11 @@ #ifdef CONFIG_PM -/* changes to device_may_wakeup take effect on the next pm state change. - * by default, devices should wakeup if they can. +/* Changes to device_may_wakeup take effect on the next pm state change. + * + * By default, most devices should leave wakeup disabled. The exceptions + * are devices that everyone expects to be wakeup sources: keyboards, + * power buttons, possibly network interfaces, etc. */ static inline void device_init_wakeup(struct device *dev, int val) { @@ -57,13 +60,16 @@ static inline int device_may_wakeup(stru #else /* !CONFIG_PM */ -/* For some reason the next two routines work even without CONFIG_PM */ +/* For some reason the following routines work even without CONFIG_PM */ static inline void device_init_wakeup(struct device *dev, int val) { dev->power.can_wakeup = !!val; } -static inline void device_set_wakeup_capable(struct device *dev, int val) { } +static inline void device_set_wakeup_capable(struct device *dev, int val) +{ + dev->power.can_wakeup = !!val; +} static inline int device_can_wakeup(struct device *dev) { _______________________________________________ linux-pm mailing list linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/linux-pm