diff options
author | Maxim Zhukov <mussitantesmortem@gmail.com> | 2018-02-05 00:09:43 +0300 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2018-02-07 09:46:09 +0100 |
commit | 8b077bdba66d1d606eb1bdce3db87ff605aa7f1c (patch) | |
tree | 07f352878f2db61ab9d5e32596244db052834618 /drivers/bluetooth | |
parent | 1ce0cec1c14cda7e514fa21b36c0f035203b447d (diff) | |
download | op-kernel-dev-8b077bdba66d1d606eb1bdce3db87ff605aa7f1c.zip op-kernel-dev-8b077bdba66d1d606eb1bdce3db87ff605aa7f1c.tar.gz |
Bluetooth: ath3k: replace hardcode numbers with define
Replaced the numbers with a readable define.
Signed-off-by: Maxim Zhukov <mussitantesmortem@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r-- | drivers/bluetooth/ath3k.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c index 204afe6..0a5cfea 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); |