staging: most: usb: fix calculation of the extra_len
authorAndrey Shvetsov <andrey.shvetsov@k2l.de>
Fri, 7 Apr 2017 13:38:38 +0000 (15:38 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 8 Apr 2017 10:41:40 +0000 (12:41 +0200)
commitf500192890c7c6745a92b677f5f69e58a2d60715
treecf91d9afdafdea53a895102ef9b6726e132862f4
parent2c4aaa1fffe8d01c621e2515cd5f290227949e71
staging: most: usb: fix calculation of the extra_len

The final size of the buffer used for the streaming transfer consists of
the size for the user payload (buffer_size) and the size for the gaps
needed by the controller (extra_len).

The current implementation of the hdm_configure_channel() corrects the
buffer size down to the next appropriate for the hardware value, that is
the whole number of frames, but uses the old unaligned value to
calculate the extra_len.

Current patch fixes the described problem.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/most/hdm-usb/hdm_usb.c