Commit 420021a395ce38b7ab2cceb52dee4038be7d8fa3
Committed by
Greg Kroah-Hartman
1 parent
5f8e2c07d7
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
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>
Showing 1 changed file with 8 additions and 0 deletions Side-by-side Diff
drivers/usb/serial/visor.c
... | ... | @@ -560,9 +560,17 @@ |
560 | 560 | */ |
561 | 561 | #define COPY_PORT(dest, src) \ |
562 | 562 | do { \ |
563 | + int i; \ | |
564 | + \ | |
565 | + for (i = 0; i < ARRAY_SIZE(src->read_urbs); ++i) { \ | |
566 | + dest->read_urbs[i] = src->read_urbs[i]; \ | |
567 | + dest->read_urbs[i]->context = dest; \ | |
568 | + dest->bulk_in_buffers[i] = src->bulk_in_buffers[i]; \ | |
569 | + } \ | |
563 | 570 | dest->read_urb = src->read_urb; \ |
564 | 571 | dest->bulk_in_endpointAddress = src->bulk_in_endpointAddress;\ |
565 | 572 | dest->bulk_in_buffer = src->bulk_in_buffer; \ |
573 | + dest->bulk_in_size = src->bulk_in_size; \ | |
566 | 574 | dest->interrupt_in_urb = src->interrupt_in_urb; \ |
567 | 575 | dest->interrupt_in_urb->context = dest; \ |
568 | 576 | dest->interrupt_in_endpointAddress = \ |