From: Dan Streetman Date: Wed, 6 Jan 2010 14:56:53 +0000 (-0500) Subject: USB: retain USB device power/wakeup setting across reconfiguration X-Git-Tag: v2.6.34-rc1~215^2~158 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=16985408b5c48585762ec3b9b7bae1dec4ad7437;p=pandora-kernel.git USB: retain USB device power/wakeup setting across reconfiguration Currently a non-root-hub USB device's wakeup settings are initialized when the device is set to a configured state using device_init_wakeup(), but this is not correct as wakeup is split into "capable" (can_wakeup) and "enabled" (should_wakeup). The settings should be initialized instead in the device initialization (usb_new_device) with the "capable" setting disabled and the "enabled" setting enabled. The "capable" setting should be set based on the device being configured or unconfigured, and "enabled" setting set based on the sysfs power/wakeup control. This patch retains the sysfs power/wakeup setting of a non-root-hub USB device over a USB device re-configuration, which can happen (for example) after a suspend/resume cycle. Signed-off-by: Dan Streetman Cc: David Brownell Cc: Alan Stern Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed