OSDN Git Service

Bluetooth: ath3k: use usb_control_msg_send() and usb_control_msg_recv()
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Sep 2020 13:43:48 +0000 (15:43 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Sep 2020 14:33:59 +0000 (16:33 +0200)
commitdbb29de70ae73a5737506d6cfe802bee81557ae7
treef2f3d2c2c8981b608998a0325932930fc286b315
parent10fbd979bd636629e3d08dda70f837c3b4864b47
Bluetooth: ath3k: use usb_control_msg_send() and usb_control_msg_recv()

The usb_control_msg_send() and usb_control_msg_recv() calls can return
an error if a "short" write/read happens, and they can handle data off
of the stack, so move the driver over to using those calls instead,
saving some logic when dynamically allocating memory.

v2: changed API of use usb_control_msg_send() and usb_control_msg_recv()

Cc: Marcel Holtmann <marcel@holtmann.org>
Cc: Johan Hedberg <johan.hedberg@gmail.com>
Link: https://lore.kernel.org/r/20200914153756.3412156-11-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20200923134348.23862-15-oneukum@suse.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/bluetooth/ath3k.c