diff options
author | Johan Hovold <jhovold@gmail.com> | 2013-05-27 14:44:38 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-05-29 10:47:45 +0900 |
commit | 420021a395ce38b7ab2cceb52dee4038be7d8fa3 (patch) | |
tree | 12338808a8b0e8b0be5079af67745ba963550963 /drivers/usb/serial/visor.c | |
parent | 5f8e2c07d75967ee49a5da1d21ddf5f50d48cda0 (diff) |
USB: visor: fix initialisation of Treo/Kyocera devices
Fix regression introduced by commit 214916f2e ("USB: visor: reimplement
using generic framework") which broke initialisation of Treo/Kyocera
devices that re-mapped bulk-in endpoints.
Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial/visor.c')
-rw-r--r-- | drivers/usb/serial/visor.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c index 8d1a3e63b0a..9910aa2edf4 100644 --- a/drivers/usb/serial/visor.c +++ b/drivers/usb/serial/visor.c @@ -560,9 +560,17 @@ static int treo_attach(struct usb_serial *serial) */ #define COPY_PORT(dest, src) \ do { \ + int i; \ + \ + for (i = 0; i < ARRAY_SIZE(src->read_urbs); ++i) { \ + dest->read_urbs[i] = src->read_urbs[i]; \ + dest->read_urbs[i]->context = dest; \ + dest->bulk_in_buffers[i] = src->bulk_in_buffers[i]; \ + } \ dest->read_urb = src->read_urb; \ dest->bulk_in_endpointAddress = src->bulk_in_endpointAddress;\ dest->bulk_in_buffer = src->bulk_in_buffer; \ + dest->bulk_in_size = src->bulk_in_size; \ dest->interrupt_in_urb = src->interrupt_in_urb; \ dest->interrupt_in_urb->context = dest; \ dest->interrupt_in_endpointAddress = \ |