Commit 420021a3 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

USB: visor: fix initialisation of Treo/Kyocera devices

Fix regression introduced by commit 214916f2 ("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: default avatarJohan Hovold <jhovold@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5f8e2c07
...@@ -560,9 +560,17 @@ static int treo_attach(struct usb_serial *serial) ...@@ -560,9 +560,17 @@ static int treo_attach(struct usb_serial *serial)
*/ */
#define COPY_PORT(dest, src) \ #define COPY_PORT(dest, src) \
do { \ 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->read_urb = src->read_urb; \
dest->bulk_in_endpointAddress = src->bulk_in_endpointAddress;\ dest->bulk_in_endpointAddress = src->bulk_in_endpointAddress;\
dest->bulk_in_buffer = src->bulk_in_buffer; \ 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 = src->interrupt_in_urb; \
dest->interrupt_in_urb->context = dest; \ dest->interrupt_in_urb->context = dest; \
dest->interrupt_in_endpointAddress = \ dest->interrupt_in_endpointAddress = \
......
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