mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 08:14:15 +08:00
media: cx231xx: Add EP5_BUF_SIZE and EP5_TIMEOUT_MS macros
Define EP5_BUF_SIZE and EP5_TIMEOUT_MS macros to make the code more readable. Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com> Suggested-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
This commit is contained in:
parent
e85322573d
commit
2b651ba688
@ -751,12 +751,12 @@ int cx231xx_ep5_bulkout(struct cx231xx *dev, u8 *firmware, u16 size)
|
||||
int ret = -ENOMEM;
|
||||
u32 *buffer;
|
||||
|
||||
buffer = kmemdup(firmware, 4096, GFP_KERNEL);
|
||||
buffer = kmemdup(firmware, EP5_BUF_SIZE, GFP_KERNEL);
|
||||
if (buffer == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
ret = usb_bulk_msg(dev->udev, usb_sndbulkpipe(dev->udev, 5),
|
||||
buffer, 4096, &actlen, 2000);
|
||||
buffer, EP5_BUF_SIZE, &actlen, EP5_TIMEOUT_MS);
|
||||
|
||||
if (ret)
|
||||
dev_err(dev->dev,
|
||||
|
@ -120,6 +120,9 @@
|
||||
#define CX23417_OSC_EN 8
|
||||
#define CX23417_RESET 9
|
||||
|
||||
#define EP5_BUF_SIZE 4096
|
||||
#define EP5_TIMEOUT_MS 2000
|
||||
|
||||
struct cx23417_fmt {
|
||||
u32 fourcc; /* v4l2 format id */
|
||||
int depth;
|
||||
|
Loading…
Reference in New Issue
Block a user