diff options
author | Tomoki Sekiyama <tomoki.sekiyama@gmail.com> | 2012-03-29 19:51:28 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-18 17:13:53 -0400 |
commit | 523fc5c14f6cad283e5a266eba0e343aed6e73d5 (patch) | |
tree | 27c657a8eb9d3391790b5c54579999a420dd9d2c | |
parent | f4a728d09a96d6a83d9c3f39035b1aa7726892ea (diff) |
USB: yurex: Remove allocation of coherent buffer for setup-packet buffer
Removes allocation of coherent buffer for the control-request setup-packet
buffer from the yurex driver. Using coherent buffers for setup-packet is
obsolete and does not work with some USB host implementations.
Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/usb/misc/yurex.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/usb/misc/yurex.c b/drivers/usb/misc/yurex.c index 897edda42270..a4a76fcd41cd 100644 --- a/drivers/usb/misc/yurex.c +++ b/drivers/usb/misc/yurex.c | |||
@@ -99,9 +99,7 @@ static void yurex_delete(struct kref *kref) | |||
99 | usb_put_dev(dev->udev); | 99 | usb_put_dev(dev->udev); |
100 | if (dev->cntl_urb) { | 100 | if (dev->cntl_urb) { |
101 | usb_kill_urb(dev->cntl_urb); | 101 | usb_kill_urb(dev->cntl_urb); |
102 | if (dev->cntl_req) | 102 | kfree(dev->cntl_req); |
103 | usb_free_coherent(dev->udev, YUREX_BUF_SIZE, | ||
104 | dev->cntl_req, dev->cntl_urb->setup_dma); | ||
105 | if (dev->cntl_buffer) | 103 | if (dev->cntl_buffer) |
106 | usb_free_coherent(dev->udev, YUREX_BUF_SIZE, | 104 | usb_free_coherent(dev->udev, YUREX_BUF_SIZE, |
107 | dev->cntl_buffer, dev->cntl_urb->transfer_dma); | 105 | dev->cntl_buffer, dev->cntl_urb->transfer_dma); |
@@ -234,9 +232,7 @@ static int yurex_probe(struct usb_interface *interface, const struct usb_device_ | |||
234 | } | 232 | } |
235 | 233 | ||
236 | /* allocate buffer for control req */ | 234 | /* allocate buffer for control req */ |
237 | dev->cntl_req = usb_alloc_coherent(dev->udev, YUREX_BUF_SIZE, | 235 | dev->cntl_req = kmalloc(YUREX_BUF_SIZE, GFP_KERNEL); |
238 | GFP_KERNEL, | ||
239 | &dev->cntl_urb->setup_dma); | ||
240 | if (!dev->cntl_req) { | 236 | if (!dev->cntl_req) { |
241 | err("Could not allocate cntl_req"); | 237 | err("Could not allocate cntl_req"); |
242 | goto error; | 238 | goto error; |