Skip to content

Commit

Permalink
Bluetooth: ath3k: no need to set same pipe multiple times
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Adam Lee authored and Gustavo Padovan committed May 27, 2014
1 parent d7b2545 commit 3abb56d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/bluetooth/ath3k.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 3abb56d

Please sign in to comment.