-
Todd Poynor authored
(1) Set device power state at runtime resume (as is done for runtime suspend) so that a later suspend does not think the device is still suspended (refusing to suspend it again). (2) Move devices from the active list to the off list only when suspending all devices as part of a system suspend, not for runtime suspend. This matches the resume code, which only moves devices from off to active during system resume, such that runtime resume currently doesn't move the suspended device back to the active list. (This also avoids reordering the device list for runtime suspends; the list is in order of registration and suspend/resume works best that way -- granted, more sweeping improvements in how device dependencies are accounted for in the suspend/resume order are also needed someday.) Runtime device suspend/resume is in some cases used frequently on battery-powered embedded devices, to save additional power and to handle device power state interactions with overall system power state on certain platforms. Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
98e1a74e