summaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/message.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-03-26 11:17:39 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-03-26 11:17:39 -0700
commit61a091827e273650b39eb87c799a6d260913fa0b (patch)
tree19f0a4840fc90da6ca3787ee7efacb5bb0c6c7a2 /drivers/usb/core/message.c
parent0c93ea4064a209cdc36de8a9a3003d43d08f46f7 (diff)
parentfd8345f8dea93691b0ceba55146088d8c05415f6 (diff)
downloadop-kernel-dev-61a091827e273650b39eb87c799a6d260913fa0b.zip
op-kernel-dev-61a091827e273650b39eb87c799a6d260913fa0b.tar.gz
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: (97 commits) USB: qcserial: add device id for HP devices USB: isp1760: Add a delay before reading the SKIPMAP registers in isp1760-hcd.c USB: allow malformed LANGID descriptors USB: pxa27x_udc: typo fixes and code cleanups USB: gadget: gadget zero uses new suspend/resume hooks USB: gadget: composite device-level suspend/resume hooks USB: r8a66597-hcd: suspend/resume support USB: more u32 conversion after transfer_buffer_length and actual_length USB: Fix cp2101 USB serial device driver termios functions for console use USB: CP2101 New Device ID USB: ipaq: handle 4 endpoint devices USB: S3C: Move usb-control.h to platform include USB: ohci-hcd: Add ARCH_S3C24XX to the ohci-s3c2410.c glue USB: pedantic: spelling correction in comment for ch9.h USB: host: fix sparse warning: Using plain integer as NULL pointer USB: ohci-s3c2410: fix name of bus clock USB: ohci-s3c2410: remove <mach/hardware.h> include USB: serial: rename cp2101 driver to cp210x USB: CP2101 Reduce Error Logging USB: CP2101 Support AN205 baud rates ...
Diffstat (limited to 'drivers/usb/core/message.c')
-rw-r--r--drivers/usb/core/message.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c
index 49e7f56..30a0690 100644
--- a/drivers/usb/core/message.c
+++ b/drivers/usb/core/message.c
@@ -59,7 +59,7 @@ static int usb_start_wait_urb(struct urb *urb, int timeout, int *actual_length)
retval = (ctx.status == -ENOENT ? -ETIMEDOUT : ctx.status);
dev_dbg(&urb->dev->dev,
- "%s timed out on ep%d%s len=%d/%d\n",
+ "%s timed out on ep%d%s len=%u/%u\n",
current->comm,
usb_endpoint_num(&urb->ep->desc),
usb_urb_dir_in(urb) ? "in" : "out",
@@ -804,18 +804,16 @@ int usb_string(struct usb_device *dev, int index, char *buf, size_t size)
dev_err(&dev->dev,
"string descriptor 0 read error: %d\n",
err);
- goto errout;
} else if (err < 4) {
dev_err(&dev->dev, "string descriptor 0 too short\n");
- err = -EINVAL;
- goto errout;
} else {
- dev->have_langid = 1;
dev->string_langid = tbuf[2] | (tbuf[3] << 8);
/* always use the first langid listed */
dev_dbg(&dev->dev, "default language 0x%04x\n",
dev->string_langid);
}
+
+ dev->have_langid = 1;
}
err = usb_string_sub(dev, dev->string_langid, index, tbuf);
@@ -1719,7 +1717,8 @@ free_interfaces:
}
kfree(new_interfaces);
- if (cp->string == NULL)
+ if (cp->string == NULL &&
+ !(dev->quirks & USB_QUIRK_CONFIG_INTF_STRINGS))
cp->string = usb_cache_string(dev, cp->desc.iConfiguration);
/* Now that all the interfaces are set up, register them
OpenPOWER on IntegriCloud