linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: ath3k: no need to set same pipe multiple times
@ 2014-05-27  5:49 Adam Lee
  2014-05-27 13:15 ` Gustavo Padovan
  0 siblings, 1 reply; 5+ messages in thread
From: Adam Lee @ 2014-05-27  5:49 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Marcel Holtmann, Johan Hedberg

Invoking usb_sndbulkpipe() on same pipe for same purpose only once is
enough.

Signed-off-by: Adam Lee <adam8157@gmail.com>
---
 drivers/bluetooth/ath3k.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c
index a83b57e..f983806 100644
--- a/drivers/bluetooth/ath3k.c
+++ b/drivers/bluetooth/ath3k.c
@@ -193,9 +193,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,
-- 
2.0.0.rc4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-06-05 18:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-27  5:49 [PATCH] Bluetooth: ath3k: no need to set same pipe multiple times Adam Lee
2014-05-27 13:15 ` Gustavo Padovan
2014-05-27 17:16   ` [PATCH v2] " Adam Lee
2014-06-05 13:47   ` [PATCH] Bluetooth: ath3k: reduce pipe setting times in ath3k_load_fwfile() Adam Lee
2014-06-05 18:29     ` Gustavo Padovan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).