projects
/
linux-2.6-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branches 'x86/apic', 'x86/cleanups', 'x86/cpufeature', 'x86/crashdump', 'x86...
[linux-2.6-block.git]
/
drivers
/
usb
/
core
/
driver.c
diff --git
a/drivers/usb/core/driver.c
b/drivers/usb/core/driver.c
index e935be7eb468b7b70b08bbb4a16f9a7b5fb6546d..8c081308b0e2d8bf2349d6b9e9703de0548213ac 100644
(file)
--- a/
drivers/usb/core/driver.c
+++ b/
drivers/usb/core/driver.c
@@
-279,7
+279,9
@@
static int usb_unbind_interface(struct device *dev)
* altsetting means creating new endpoint device entries).
* When either of these happens, defer the Set-Interface.
*/
* altsetting means creating new endpoint device entries).
* When either of these happens, defer the Set-Interface.
*/
- if (!error && intf->dev.power.status == DPM_ON)
+ if (intf->cur_altsetting->desc.bAlternateSetting == 0)
+ ; /* Already in altsetting 0 so skip Set-Interface */
+ else if (!error && intf->dev.power.status == DPM_ON)
usb_set_interface(udev, intf->altsetting[0].
desc.bInterfaceNumber, 0);
else
usb_set_interface(udev, intf->altsetting[0].
desc.bInterfaceNumber, 0);
else
@@
-1610,7
+1612,8
@@
int usb_external_resume_device(struct usb_device *udev)
status = usb_resume_both(udev);
udev->last_busy = jiffies;
usb_pm_unlock(udev);
status = usb_resume_both(udev);
udev->last_busy = jiffies;
usb_pm_unlock(udev);
- do_unbind_rebind(udev, DO_REBIND);
+ if (status == 0)
+ do_unbind_rebind(udev, DO_REBIND);
/* Now that the device is awake, we can start trying to autosuspend
* it again. */
/* Now that the device is awake, we can start trying to autosuspend
* it again. */