linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Adam Lee <adam8157@gmail.com>
To: Gustavo Padovan <gustavo@padovan.org>
Cc: Marcel Holtmann <marcel@holtmann.org>, linux-bluetooth@vger.kernel.org
Subject: [PATCH] Bluetooth: ath3k: reduce pipe setting times in ath3k_load_fwfile()
Date: Thu,  5 Jun 2014 21:47:44 +0800	[thread overview]
Message-ID: <1401976064-6736-1-git-send-email-adam8157@gmail.com> (raw)
In-Reply-To: <20140527131548.GB2034@joana>

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 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c
index 4aef96b..f938263 100644
--- a/drivers/bluetooth/ath3k.c
+++ b/drivers/bluetooth/ath3k.c
@@ -288,10 +288,10 @@ static int ath3k_load_fwfile(struct usb_device *udev,
 	sent += size;
 	count -= size;
 
+	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

  parent reply	other threads:[~2014-06-05 13:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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   ` Adam Lee [this message]
2014-06-05 18:29     ` [PATCH] Bluetooth: ath3k: reduce pipe setting times in ath3k_load_fwfile() 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=1401976064-6736-1-git-send-email-adam8157@gmail.com \
    --to=adam8157@gmail.com \
    --cc=gustavo@padovan.org \
    --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).