]> git.baikalelectronics.ru Git - kernel.git/commit
USB: legousbtower: use usb_control_msg_recv()
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Sep 2020 15:37:50 +0000 (17:37 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Sep 2020 09:02:45 +0000 (11:02 +0200)
commit9c873ca2917d186f4e2e6e0149ec793b296fc198
tree96bfb01523a543d603929b51afac1c9198eab89f
parent2968984e6aee7b6761797cd9c4a9fbfb9cbc53b3
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.

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>
drivers/usb/misc/legousbtower.c