Commit 4282d4f2 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Merge kroah.com:/home/greg/linux/BK/bleeding_edge-2.5

into kroah.com:/home/greg/linux/BK/gregkh-2.5
parents 702d27c7 1feeeb01
...@@ -828,12 +828,12 @@ static void *usblp_probe(struct usb_device *dev, unsigned int ifnum, ...@@ -828,12 +828,12 @@ static void *usblp_probe(struct usb_device *dev, unsigned int ifnum,
usblp->writeurb = usb_alloc_urb(0, GFP_KERNEL); usblp->writeurb = usb_alloc_urb(0, GFP_KERNEL);
if (!usblp->writeurb) { if (!usblp->writeurb) {
err("out of memory"); err("out of memory");
goto abort; goto abort_minor;
} }
usblp->readurb = usb_alloc_urb(0, GFP_KERNEL); usblp->readurb = usb_alloc_urb(0, GFP_KERNEL);
if (!usblp->readurb) { if (!usblp->readurb) {
err("out of memory"); err("out of memory");
goto abort; goto abort_minor;
} }
/* Malloc device ID string buffer to the largest expected length, /* Malloc device ID string buffer to the largest expected length,
...@@ -841,7 +841,7 @@ static void *usblp_probe(struct usb_device *dev, unsigned int ifnum, ...@@ -841,7 +841,7 @@ static void *usblp_probe(struct usb_device *dev, unsigned int ifnum,
* could change in length. */ * could change in length. */
if (!(usblp->device_id_string = kmalloc(DEVICE_ID_SIZE, GFP_KERNEL))) { if (!(usblp->device_id_string = kmalloc(DEVICE_ID_SIZE, GFP_KERNEL))) {
err("out of memory for device_id_string"); err("out of memory for device_id_string");
goto abort; goto abort_minor;
} }
/* Malloc write/read buffers in one chunk. We somewhat wastefully /* Malloc write/read buffers in one chunk. We somewhat wastefully
...@@ -849,7 +849,7 @@ static void *usblp_probe(struct usb_device *dev, unsigned int ifnum, ...@@ -849,7 +849,7 @@ static void *usblp_probe(struct usb_device *dev, unsigned int ifnum,
* alternate setting can be changed later via an ioctl. */ * alternate setting can be changed later via an ioctl. */
if (!(usblp->buf = kmalloc(2 * USBLP_BUF_SIZE, GFP_KERNEL))) { if (!(usblp->buf = kmalloc(2 * USBLP_BUF_SIZE, GFP_KERNEL))) {
err("out of memory for buf"); err("out of memory for buf");
goto abort; goto abort_minor;
} }
/* Lookup quirks for this printer. */ /* Lookup quirks for this printer. */
...@@ -863,12 +863,12 @@ static void *usblp_probe(struct usb_device *dev, unsigned int ifnum, ...@@ -863,12 +863,12 @@ static void *usblp_probe(struct usb_device *dev, unsigned int ifnum,
dbg("incompatible printer-class device 0x%4.4X/0x%4.4X", dbg("incompatible printer-class device 0x%4.4X/0x%4.4X",
dev->descriptor.idVendor, dev->descriptor.idVendor,
dev->descriptor.idProduct); dev->descriptor.idProduct);
goto abort; goto abort_minor;
} }
/* Setup the selected alternate setting and endpoints. */ /* Setup the selected alternate setting and endpoints. */
if (usblp_set_protocol(usblp, protocol) < 0) if (usblp_set_protocol(usblp, protocol) < 0)
goto abort; goto abort_minor;
/* Retrieve and store the device ID string. */ /* Retrieve and store the device ID string. */
usblp_cache_device_id_string(usblp); usblp_cache_device_id_string(usblp);
...@@ -897,6 +897,8 @@ static void *usblp_probe(struct usb_device *dev, unsigned int ifnum, ...@@ -897,6 +897,8 @@ static void *usblp_probe(struct usb_device *dev, unsigned int ifnum,
return usblp; return usblp;
abort_minor:
usb_deregister_dev (&usblp_driver, 1, usblp->minor);
abort: abort:
if (usblp) { if (usblp) {
usb_free_urb(usblp->writeurb); usb_free_urb(usblp->writeurb);
......
...@@ -356,11 +356,10 @@ qh_completions ( ...@@ -356,11 +356,10 @@ qh_completions (
* from an interrupt QTD * from an interrupt QTD
*/ */
qtd->hw_token = (qtd->hw_token qtd->hw_token = (qtd->hw_token
& ~__constant_cpu_to_le32 (0x8300)) & __constant_cpu_to_le32 (0x8300))
| cpu_to_le32 (qtd->length << 16) | cpu_to_le32 (qtd->length << 16)
| __constant_cpu_to_le32 (QTD_IOC | __constant_cpu_to_le32 (QTD_STS_ACTIVE
| (EHCI_TUNE_CERR << 10) | (EHCI_TUNE_CERR << 10));
| QTD_STS_ACTIVE);
qtd->hw_buf [0] &= ~__constant_cpu_to_le32 (0x0fff); qtd->hw_buf [0] &= ~__constant_cpu_to_le32 (0x0fff);
/* this offset, and the length above, /* this offset, and the length above,
......
...@@ -1396,12 +1396,12 @@ static struct hid_device *usb_hid_configure(struct usb_device *dev, int ifnum) ...@@ -1396,12 +1396,12 @@ static struct hid_device *usb_hid_configure(struct usb_device *dev, int ifnum)
if (usb_string(dev, dev->descriptor.iManufacturer, buf, 64) > 0) { if (usb_string(dev, dev->descriptor.iManufacturer, buf, 64) > 0) {
strcat(hid->name, buf); strcat(hid->name, buf);
if (usb_string(dev, dev->descriptor.iProduct, buf, 64) > 0) if (usb_string(dev, dev->descriptor.iProduct, buf, 64) > 0)
sprintf(hid->name, "%s %s", hid->name, buf); snprintf(hid->name, 64, "%s %s", hid->name, buf);
} else } else
sprintf(hid->name, "%04x:%04x", dev->descriptor.idVendor, dev->descriptor.idProduct); snprintf(hid->name, 128, "%04x:%04x", dev->descriptor.idVendor, dev->descriptor.idProduct);
usb_make_path(dev, buf, 63); usb_make_path(dev, buf, 64);
sprintf(hid->phys, "%s/input%d", buf, ifnum); snprintf(hid->phys, 64, "%s/input%d", buf, ifnum);
if (usb_string(dev, dev->descriptor.iSerialNumber, hid->uniq, 64) <= 0) if (usb_string(dev, dev->descriptor.iSerialNumber, hid->uniq, 64) <= 0)
hid->uniq[0] = 0; hid->uniq[0] = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment