USB: symbolserial: Correct transferred data size
authorPhilipp Hachtmann <hachti@hachti.de>
Mon, 17 Aug 2015 15:31:47 +0000 (17:31 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Aug 2015 17:06:22 +0000 (10:06 -0700)
commit8ae25a355b5969e12f3185e8cb8eb08b871c9084
treea49c7e83dad60d779f03a6066ec3a8068bfb2c0d
parent951d3793bbfc0a441d791d820183aa3085c83ea9
USB: symbolserial: Correct transferred data size

The scanner (here DS3508) always returns 64 bytes per urb buffer. The first
byte indicates the data length used in the current buffer. There even was
a comment describing this. But the comment also said that we'll send
everything in the buffer to the tty layer. That means sending the actual
barcode data and lots of trailing zeroes. This patch lets the driver only
send the real data.

Signed-off-by: Philipp Hachtmann <hachti@hachti.de>
Acked-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/symbolserial.c