USB: legousbtower: use usb_control_msg_recv()
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Sep 2020 13:43:45 +0000 (15:43 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Sep 2020 14:33:59 +0000 (16:33 +0200)
commitd9f0d82f06c6775b3adb9e4925e27377bc87af54
treef5c864dfaff2be0a144908a7614be277a1e08f76
parent9ad71af922a8b4a619665498e0094dc5206e9f50
USB: legousbtower: use usb_control_msg_recv()

The usb_control_msg_recv() function can handle data on the stack, as
well as properly detecting short reads, so move to use that function
instead of the older usb_control_msg() call.  This ends up removing a
lot of extra lines in the driver.

v2: change API of usb_control_msg_send()

Cc: Juergen Stuber <starblue@users.sourceforge.net>
Link: https://lore.kernel.org/r/20200914153756.3412156-6-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20200923134348.23862-12-oneukum@suse.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/misc/legousbtower.c