USB: opticon: Fix long-standing bugs in opticon driver
commit3812790e565781417cc93fc5486f7f7624bbdad1
authorAlon Ziv <alon+git@nolaviz.org>
Sun, 10 Oct 2010 06:32:18 +0000 (10 08:32 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 21 Mar 2011 19:43:36 +0000 (21 12:43 -0700)
treed27fcb36563e477f046f2c95bc7c794729097de1
parent4002f1cd2d58821fb269f1756a9aa109c5355fe0
USB: opticon: Fix long-standing bugs in opticon driver

commit 97cd8dc4ca9a1a5efb2cc38758e01492e3b013e2 upstream.

The bulk-read callback had two bugs:
a) The bulk-in packet's leading two zeros were returned (and the two last
   bytes truncated)
b) The wrong URB was transmitted for the second (and later) read requests,
   causing further reads to return the entire packet (including leading
   zeros)

Signed-off-by: Alon Ziv <alon-git@nolaviz.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/serial/opticon.c