aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/core/driver.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-12-17 15:01:06 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2008-12-17 15:01:06 -0800
commit3797455fd269f6ae0bc228d5206b502830af03f4 (patch)
tree42e687025cc6e6d1d4aeec6261bf8255737616a0 /drivers/usb/core/driver.c
parent5b8bd54d5d38649a0a61e1146525212e81061971 (diff)
parentaf4b8514aafd53d97b05a0a30b7d4cfd2cbb7b81 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: USB: pl2303: add id for Hewlett-Packard LD220-HP POS pole display USB: set correct configuration in probe of ti_usb_3410_5052 USB: add 5372:2303 to pl2303 USB: skip Set-Interface(0) if already in altsetting 0 USB: fix comment about endianness of descriptors USB: Documentation/usb/gadget_serial.txt: update to match driver use_acm behaviour usbmon: drop bogus 0t from usbmon.txt USB: gadget: fix rndis working at high speed USB: ftdi_sio: Adding Ewert Energy System's CANdapter PID USB: tty: SprogII DCC controller identifiers usb-storage: update unusual_devs entry for Nokia 5310 USB: Unusual devs patch for Nokia 3500c USB: storage: unusual_devs.h: Nokia 3109c addition USB: fix problem with usbtmc driver not loading properly
Diffstat (limited to 'drivers/usb/core/driver.c')
-rw-r--r--drivers/usb/core/driver.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c
index 3d7793d9303..8c081308b0e 100644
--- 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.
*/
- 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