From: Adam Lee <adam8157@gmail.com>
To: linux-bluetooth@vger.kernel.org
Cc: Marcel Holtmann <marcel@holtmann.org>,
Johan Hedberg <johan.hedberg@gmail.com>
Subject: [PATCH] Bluetooth: ath3k: no need to set same pipe multiple times
Date: Tue, 27 May 2014 13:49:07 +0800 [thread overview]
Message-ID: <1401169747-11033-1-git-send-email-adam8157@gmail.com> (raw)
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
next reply other threads:[~2014-05-27 5:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-27 5:49 Adam Lee [this message]
2014-05-27 13:15 ` [PATCH] Bluetooth: ath3k: no need to set same pipe multiple times 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1401169747-11033-1-git-send-email-adam8157@gmail.com \
--to=adam8157@gmail.com \
--cc=johan.hedberg@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=marcel@holtmann.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).