diff options
Diffstat (limited to 'drivers/usb/misc/iowarrior.c')
-rw-r--r-- | drivers/usb/misc/iowarrior.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/usb/misc/iowarrior.c b/drivers/usb/misc/iowarrior.c index d69665c8de02..fc51207b71b8 100644 --- a/drivers/usb/misc/iowarrior.c +++ b/drivers/usb/misc/iowarrior.c | |||
@@ -118,7 +118,7 @@ static int usb_get_report(struct usb_device *dev, | |||
118 | USB_DIR_IN | USB_TYPE_CLASS | | 118 | USB_DIR_IN | USB_TYPE_CLASS | |
119 | USB_RECIP_INTERFACE, (type << 8) + id, | 119 | USB_RECIP_INTERFACE, (type << 8) + id, |
120 | inter->desc.bInterfaceNumber, buf, size, | 120 | inter->desc.bInterfaceNumber, buf, size, |
121 | GET_TIMEOUT); | 121 | GET_TIMEOUT*HZ); |
122 | } | 122 | } |
123 | //#endif | 123 | //#endif |
124 | 124 | ||
@@ -133,7 +133,7 @@ static int usb_set_report(struct usb_interface *intf, unsigned char type, | |||
133 | USB_TYPE_CLASS | USB_RECIP_INTERFACE, | 133 | USB_TYPE_CLASS | USB_RECIP_INTERFACE, |
134 | (type << 8) + id, | 134 | (type << 8) + id, |
135 | intf->cur_altsetting->desc.bInterfaceNumber, buf, | 135 | intf->cur_altsetting->desc.bInterfaceNumber, buf, |
136 | size, 1); | 136 | size, HZ); |
137 | } | 137 | } |
138 | 138 | ||
139 | /*---------------------*/ | 139 | /*---------------------*/ |
@@ -417,14 +417,14 @@ static ssize_t iowarrior_write(struct file *file, | |||
417 | if (!int_out_urb) { | 417 | if (!int_out_urb) { |
418 | retval = -ENOMEM; | 418 | retval = -ENOMEM; |
419 | dbg("%s Unable to allocate urb ", __func__); | 419 | dbg("%s Unable to allocate urb ", __func__); |
420 | goto error; | 420 | goto error_no_urb; |
421 | } | 421 | } |
422 | buf = usb_buffer_alloc(dev->udev, dev->report_size, | 422 | buf = usb_buffer_alloc(dev->udev, dev->report_size, |
423 | GFP_KERNEL, &int_out_urb->transfer_dma); | 423 | GFP_KERNEL, &int_out_urb->transfer_dma); |
424 | if (!buf) { | 424 | if (!buf) { |
425 | retval = -ENOMEM; | 425 | retval = -ENOMEM; |
426 | dbg("%s Unable to allocate buffer ", __func__); | 426 | dbg("%s Unable to allocate buffer ", __func__); |
427 | goto error; | 427 | goto error_no_buffer; |
428 | } | 428 | } |
429 | usb_fill_int_urb(int_out_urb, dev->udev, | 429 | usb_fill_int_urb(int_out_urb, dev->udev, |
430 | usb_sndintpipe(dev->udev, | 430 | usb_sndintpipe(dev->udev, |
@@ -459,7 +459,9 @@ static ssize_t iowarrior_write(struct file *file, | |||
459 | error: | 459 | error: |
460 | usb_buffer_free(dev->udev, dev->report_size, buf, | 460 | usb_buffer_free(dev->udev, dev->report_size, buf, |
461 | int_out_urb->transfer_dma); | 461 | int_out_urb->transfer_dma); |
462 | error_no_buffer: | ||
462 | usb_free_urb(int_out_urb); | 463 | usb_free_urb(int_out_urb); |
464 | error_no_urb: | ||
463 | atomic_dec(&dev->write_busy); | 465 | atomic_dec(&dev->write_busy); |
464 | wake_up_interruptible(&dev->write_wait); | 466 | wake_up_interruptible(&dev->write_wait); |
465 | exit: | 467 | exit: |
@@ -748,7 +750,6 @@ static int iowarrior_probe(struct usb_interface *interface, | |||
748 | struct usb_endpoint_descriptor *endpoint; | 750 | struct usb_endpoint_descriptor *endpoint; |
749 | int i; | 751 | int i; |
750 | int retval = -ENOMEM; | 752 | int retval = -ENOMEM; |
751 | int idele = 0; | ||
752 | 753 | ||
753 | /* allocate memory for our device state and intialize it */ | 754 | /* allocate memory for our device state and intialize it */ |
754 | dev = kzalloc(sizeof(struct iowarrior), GFP_KERNEL); | 755 | dev = kzalloc(sizeof(struct iowarrior), GFP_KERNEL); |
@@ -824,11 +825,10 @@ static int iowarrior_probe(struct usb_interface *interface, | |||
824 | 825 | ||
825 | /* Set the idle timeout to 0, if this is interface 0 */ | 826 | /* Set the idle timeout to 0, if this is interface 0 */ |
826 | if (dev->interface->cur_altsetting->desc.bInterfaceNumber == 0) { | 827 | if (dev->interface->cur_altsetting->desc.bInterfaceNumber == 0) { |
827 | idele = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), | 828 | usb_control_msg(udev, usb_sndctrlpipe(udev, 0), |
828 | 0x0A, | 829 | 0x0A, |
829 | USB_TYPE_CLASS | USB_RECIP_INTERFACE, 0, | 830 | USB_TYPE_CLASS | USB_RECIP_INTERFACE, 0, |
830 | 0, NULL, 0, USB_CTRL_SET_TIMEOUT); | 831 | 0, NULL, 0, USB_CTRL_SET_TIMEOUT); |
831 | dbg("idele = %d", idele); | ||
832 | } | 832 | } |
833 | /* allow device read and ioctl */ | 833 | /* allow device read and ioctl */ |
834 | dev->present = 1; | 834 | dev->present = 1; |