diff options
author | Himadri Pandya <himadrispandya@gmail.com> | 2021-08-01 23:31:19 +0300 |
---|---|---|
committer | Johan Hovold <johan@kernel.org> | 2021-09-21 15:01:14 +0300 |
commit | 0d027eea8988a9d9ec2ca4df150b37d82e9e6623 (patch) | |
tree | 97fde8012e3940572951bd8781ee27590851729d /drivers/usb/serial/ftdi_sio.c | |
parent | 6400b974910407cd299dc08578a6c1792b4c922a (diff) | |
download | linux-0d027eea8988a9d9ec2ca4df150b37d82e9e6623.tar.xz |
USB: serial: f81232: use usb_control_msg_recv() and usb_control_msg_send()
The new wrapper functions usb_control_msg_send/recv accept stack
variables for USB message buffers and eliminate the need of manually
allocating temporary DMA buffers. The read wrapper also treats short
reads as errors. Hence use the wrappers instead of using
usb_control_msg() directly.
Note that the conversion of f81534a_ctrl_set_register() adds an extra an
extra allocation and memcpy for every retry. Since this function is
called rarely and retries are hopefully rare, the overhead should be
acceptable.
Also note that short reads are now logged as -EREMOTEIO instead of
indicating the amount of data read.
Signed-off-by: Himadri Pandya <himadrispandya@gmail.com>
Link: https://lore.kernel.org/r/20210801203122.3515-4-himadrispandya@gmail.com
[ johan: amend commit message ]
Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'drivers/usb/serial/ftdi_sio.c')
0 files changed, 0 insertions, 0 deletions