linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] drivers: bluetooth: ath3k: replace hardcode numbers with define
@ 2018-02-04 20:59 Maxim Zhukov
  2018-02-04 20:59 ` [PATCH 2/5] drivers: bluetooth: ath3k: do not init variables Maxim Zhukov
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Maxim Zhukov @ 2018-02-04 20:59 UTC (permalink / raw)
  To: marcel; +Cc: johan.hedberg, linux-bluetooth, linux-kernel, Maxim Zhukov

Replaced the numbers with a readable define.

Signed-off-by: Maxim Zhukov <mussitantesmortem@gmail.com>
---
 drivers/bluetooth/ath3k.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c
index 204afe66de92..0a5cfea44529 100644
--- a/drivers/bluetooth/ath3k.c
+++ b/drivers/bluetooth/ath3k.c
@@ -227,15 +227,16 @@ static int ath3k_load_firmware(struct usb_device *udev,
 		return -ENOMEM;
 	}
 
-	memcpy(send_buf, firmware->data, 20);
+	memcpy(send_buf, firmware->data, FW_HDR_SIZE);
 	err = usb_control_msg(udev, pipe, USB_REQ_DFU_DNLOAD, USB_TYPE_VENDOR,
-			      0, 0, send_buf, 20, USB_CTRL_SET_TIMEOUT);
+			      0, 0, send_buf, FW_HDR_SIZE,
+			      USB_CTRL_SET_TIMEOUT);
 	if (err < 0) {
 		BT_ERR("Can't change to loading configuration err");
 		goto error;
 	}
-	sent += 20;
-	count -= 20;
+	sent += FW_HDR_SIZE;
+	count -= FW_HDR_SIZE;
 
 	pipe = usb_sndbulkpipe(udev, 0x02);
 
-- 
2.16.1

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

end of thread, other threads:[~2018-02-07  8:55 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-04 20:59 [PATCH 1/5] drivers: bluetooth: ath3k: replace hardcode numbers with define Maxim Zhukov
2018-02-04 20:59 ` [PATCH 2/5] drivers: bluetooth: ath3k: do not init variables Maxim Zhukov
2018-02-04 20:59 ` [PATCH 3/5] drivers: bluetooth: ath3k: remove blank line after if Maxim Zhukov
2018-02-04 20:59 ` [PATCH 4/5] drivers: bluetooth: ath3k: Fix warning: quoted string split across lines Maxim Zhukov
2018-02-04 21:06   ` [PATCH 1/5] drivers: bluetooth: ath3k: replace hardcode numbers with define Maxim Zhukov
2018-02-04 21:06     ` [PATCH 2/5] drivers: bluetooth: ath3k: do not init variables Maxim Zhukov
2018-02-04 21:06     ` [PATCH 3/5] drivers: bluetooth: ath3k: remove blank line after if Maxim Zhukov
2018-02-04 21:06     ` [PATCH 4/5] drivers: bluetooth: ath3k: Fix warning: quoted string split across lines Maxim Zhukov
2018-02-04 21:06     ` [PATCH 5/5] drivers: bluetooth: ath3k: fix checkpatch warning Maxim Zhukov
2018-02-04 21:09   ` [PATCH v2 0/5] lite fixes for ath3k Maxim Zhukov
2018-02-04 21:09     ` [PATCH v2 1/5] drivers: bluetooth: ath3k: replace hardcode numbers with define Maxim Zhukov
2018-02-04 21:09     ` [PATCH v2 2/5] drivers: bluetooth: ath3k: do not init variables Maxim Zhukov
2018-02-04 21:09     ` [PATCH v2 3/5] drivers: bluetooth: ath3k: remove blank line after if Maxim Zhukov
2018-02-04 21:09     ` [PATCH v2 4/5] drivers: bluetooth: ath3k: Fix warning: quoted string split across lines Maxim Zhukov
2018-02-04 21:09     ` [PATCH v2 5/5] drivers: bluetooth: ath3k: fix checkpatch warning Maxim Zhukov
2018-02-07  8:55     ` [PATCH v2 0/5] lite fixes for ath3k Marcel Holtmann
2018-02-04 20:59 ` [PATCH 5/5] drivers: bluetooth: ath3k: fix Maxim Zhukov

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).