USB: serial: cp210x: use usb_control_msg_recv() and usb_control_msg_send()
authorHimadri Pandya <himadrispandya@gmail.com>
Fri, 1 Oct 2021 06:57:20 +0000 (08:57 +0200)
committerJohan Hovold <johan@kernel.org>
Wed, 27 Oct 2021 12:57:41 +0000 (14:57 +0200)
commitf5cfbecb0a162319464c9408420282d22ed69721
tree9862bdd5c799dbe01e634650624074b44626ceb0
parent74f266455062c158f343bc3aa35ef84b3eb7adf1
USB: serial: cp210x: use usb_control_msg_recv() and usb_control_msg_send()

The new wrapper functions for usb_control_msg() can accept data from
stack and treat short reads as errors. Hence use the wrappers functions.
Please note that because of this change, cp210x_read_reg_block() will no
longer log the length of short reads.

Signed-off-by: Himadri Pandya <himadrispandya@gmail.com>
Link: https://lore.kernel.org/r/20211001065720.21330-3-himadrispandya@gmail.com
[ johan: style changes ]
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/cp210x.c