diff options
author | Adam Lee <adam8157@gmail.com> | 2014-05-27 07:49:07 +0200 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2014-05-27 15:14:45 +0200 |
commit | 3abb56de8750675a2d70705687254c9e653ffd4c (patch) | |
tree | 0a107ee2c4b811adb447fe8bbc40e7af10a5a611 /drivers/bluetooth | |
parent | Bluetooth: Clearly distinguish mgmt LTK type from authenticated property (diff) | |
download | linux-3abb56de8750675a2d70705687254c9e653ffd4c.tar.xz linux-3abb56de8750675a2d70705687254c9e653ffd4c.zip |
Bluetooth: ath3k: no need to set same pipe multiple times
Invoking usb_sndbulkpipe() on same pipe for same purpose only once is
enough.
Signed-off-by: Adam Lee <adam8157@gmail.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r-- | drivers/bluetooth/ath3k.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c index be571fef185d..4aef96b0eb63 100644 --- a/drivers/bluetooth/ath3k.c +++ b/drivers/bluetooth/ath3k.c @@ -191,9 +191,10 @@ static int ath3k_load_firmware(struct usb_device *udev, sent += 20; count -= 20; + pipe = usb_sndbulkpipe(udev, 0x02); + while (count) { size = min_t(uint, count, BULK_SIZE); - pipe = usb_sndbulkpipe(udev, 0x02); memcpy(send_buf, firmware->data + sent, size); err = usb_bulk_msg(udev, pipe, send_buf, size, |