media: s2255: fix control-message timeouts
commitf71d272ad4
upstream. USB control-message timeouts are specified in milliseconds and should specifically not vary with CONFIG_HZ. Use the common control-message timeout define for the five-second timeouts. Fixes:38f993ad8b
("V4L/DVB (8125): This driver adds support for the Sensoray 2255 devices.") Cc: stable@vger.kernel.org # 2.6.27 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
3a49cd738b
commit
f64b379bde
@ -1884,7 +1884,7 @@ static long s2255_vendor_req(struct s2255_dev *dev, unsigned char Request,
|
|||||||
USB_TYPE_VENDOR | USB_RECIP_DEVICE |
|
USB_TYPE_VENDOR | USB_RECIP_DEVICE |
|
||||||
USB_DIR_IN,
|
USB_DIR_IN,
|
||||||
Value, Index, buf,
|
Value, Index, buf,
|
||||||
TransferBufferLength, HZ * 5);
|
TransferBufferLength, USB_CTRL_SET_TIMEOUT);
|
||||||
|
|
||||||
if (r >= 0)
|
if (r >= 0)
|
||||||
memcpy(TransferBuffer, buf, TransferBufferLength);
|
memcpy(TransferBuffer, buf, TransferBufferLength);
|
||||||
@ -1893,7 +1893,7 @@ static long s2255_vendor_req(struct s2255_dev *dev, unsigned char Request,
|
|||||||
r = usb_control_msg(dev->udev, usb_sndctrlpipe(dev->udev, 0),
|
r = usb_control_msg(dev->udev, usb_sndctrlpipe(dev->udev, 0),
|
||||||
Request, USB_TYPE_VENDOR | USB_RECIP_DEVICE,
|
Request, USB_TYPE_VENDOR | USB_RECIP_DEVICE,
|
||||||
Value, Index, buf,
|
Value, Index, buf,
|
||||||
TransferBufferLength, HZ * 5);
|
TransferBufferLength, USB_CTRL_SET_TIMEOUT);
|
||||||
}
|
}
|
||||||
kfree(buf);
|
kfree(buf);
|
||||||
return r;
|
return r;
|
||||||
|
Reference in New Issue
Block a user