aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth/ath3k.c
diff options
context:
space:
mode:
authorAdam Lee <adam8157@gmail.com>2014-06-05 09:47:44 -0400
committerMarcel Holtmann <marcel@holtmann.org>2014-07-03 11:42:41 -0400
commitb0c3e138b467a5cc3b2eb44c6525227f66d1496d (patch)
treebe3c60cb82380cf0b0e6c80480827e310189a98a /drivers/bluetooth/ath3k.c
parent53730107b223e31f5d2fe2648f58a4ef90ad6f12 (diff)
Bluetooth: ath3k: reduce pipe setting times in ath3k_load_fwfile()
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/ath3k.c')
-rw-r--r--drivers/bluetooth/ath3k.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c
index f50dffc0374f..abe6aecbabb2 100644
--- a/drivers/bluetooth/ath3k.c
+++ b/drivers/bluetooth/ath3k.c
@@ -288,10 +288,10 @@ static int ath3k_load_fwfile(struct usb_device *udev,
288 sent += size; 288 sent += size;
289 count -= size; 289 count -= size;
290 290
291 pipe = usb_sndbulkpipe(udev, 0x02);
292
291 while (count) { 293 while (count) {
292 size = min_t(uint, count, BULK_SIZE); 294 size = min_t(uint, count, BULK_SIZE);
293 pipe = usb_sndbulkpipe(udev, 0x02);
294
295 memcpy(send_buf, firmware->data + sent, size); 295 memcpy(send_buf, firmware->data + sent, size);
296 296
297 err = usb_bulk_msg(udev, pipe, send_buf, size, 297 err = usb_bulk_msg(udev, pipe, send_buf, size,