Bluetooth: ath3k: no need to set same pipe multiple times
PATCH 1/1 Bluetooth: ath3k: no need to set same pipe multiple times
Invoking usb_sndbulkpipe() on same pipe for same purpose only once is enough.
--- drivers/bluetooth/ath3k.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/bluetooth/ath3k.c +2 -1
@@ -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,
Signature · 1 line
2.0.0.rc4
Hi Adam,
2014-05-27 Adam Lee <[email protected]>:
Quoted 7 lines
Invoking
usb_sndbulkpipe()on same pipe for same purpose only once is enough.Signed-off-by Adam Lee <[email protected]>--- drivers/bluetooth/ath3k.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Patch has been applied to bluetooth-next. Thanks.
Gustavo
PATCH v2 1/1 Bluetooth: ath3k: no need to set same pipe multiple times
Invoking usb_sndbulkpipe() on same pipe for same purpose only once is enough.
v2: patch the missing place too, sorry.
--- drivers/bluetooth/ath3k.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/bluetooth/ath3k.c +4 -3
@@ -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,
@@ -289,10 +290,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,
Signature · 1 line
2.0.0.rc4
PATCH 1/1 Bluetooth: ath3k: reduce pipe setting times in ath3k_load_fwfile()
In reply to Gustavo PadovanInvoking usb_sndbulkpipe() on same pipe for same purpose only once is enough.
--- drivers/bluetooth/ath3k.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/bluetooth/ath3k.c +2 -2
@@ -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,
Signature · 1 line
2.0.0
Re: [PATCH] Bluetooth: ath3k: reduce pipe setting times in ath3k_load_fwfile()
Hi Adam,
2014-06-05 Adam Lee <[email protected]>:
Quoted 7 lines
Invoking
usb_sndbulkpipe()on same pipe for same purpose only once is enough.Signed-off-by Adam Lee <[email protected]>--- drivers/bluetooth/ath3k.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Patch has been applied to bluetooth-next. Thanks.
Gustavo