media: stk1160: fix control-message timeouts
USB control-message timeouts are specified in milliseconds and should
specifically not vary with CONFIG_HZ.
Fixes: 9cb2173e6e
("[media] media: Add stk1160 new driver (easycap replacement)")
Cc: stable@vger.kernel.org # 3.7
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
Родитель
f71d272ad4
Коммит
6aa6e70cdb
|
@ -65,7 +65,7 @@ int stk1160_read_reg(struct stk1160 *dev, u16 reg, u8 *value)
|
|||
return -ENOMEM;
|
||||
ret = usb_control_msg(dev->udev, pipe, 0x00,
|
||||
USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
|
||||
0x00, reg, buf, sizeof(u8), HZ);
|
||||
0x00, reg, buf, sizeof(u8), 1000);
|
||||
if (ret < 0) {
|
||||
stk1160_err("read failed on reg 0x%x (%d)\n",
|
||||
reg, ret);
|
||||
|
@ -85,7 +85,7 @@ int stk1160_write_reg(struct stk1160 *dev, u16 reg, u16 value)
|
|||
|
||||
ret = usb_control_msg(dev->udev, pipe, 0x01,
|
||||
USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
|
||||
value, reg, NULL, 0, HZ);
|
||||
value, reg, NULL, 0, 1000);
|
||||
if (ret < 0) {
|
||||
stk1160_err("write failed on reg 0x%x (%d)\n",
|
||||
reg, ret);
|
||||
|
|
Загрузка…
Ссылка в новой задаче