summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2022-10-06 11:53:42 +0200
committerThomas Zimmermann <tzimmermann@suse.de>2022-10-07 13:45:27 +0200
commit2c1eafc40e53312864bf2fdccb55052dcbd9e8b2 (patch)
tree8f38da027ef2413bfa2f5b7148b9ed6d8f2067e7
parentc020f66013b6136a68a3a4ad74cc7af3b3310586 (diff)
downloadlinux-stable-2c1eafc40e53312864bf2fdccb55052dcbd9e8b2.tar.gz
linux-stable-2c1eafc40e53312864bf2fdccb55052dcbd9e8b2.tar.bz2
linux-stable-2c1eafc40e53312864bf2fdccb55052dcbd9e8b2.zip
drm/udl: Use USB timeout constant when reading EDID
Set the USB control-message timeout to the USB default of 5 seconds. Done for consistency with other uses of usb_control_msg() in udl and other drivers. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20221006095355.23579-4-tzimmermann@suse.de
-rw-r--r--drivers/gpu/drm/udl/udl_connector.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/udl/udl_connector.c b/drivers/gpu/drm/udl/udl_connector.c
index e9539829032c..cb3d6820eaf9 100644
--- a/drivers/gpu/drm/udl/udl_connector.c
+++ b/drivers/gpu/drm/udl/udl_connector.c
@@ -31,7 +31,7 @@ static int udl_get_edid_block(void *data, u8 *buf, unsigned int block,
int bval = (i + block * EDID_LENGTH) << 8;
ret = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
0x02, (0x80 | (0x02 << 5)), bval,
- 0xA1, read_buff, 2, 1000);
+ 0xA1, read_buff, 2, USB_CTRL_GET_TIMEOUT);
if (ret < 1) {
DRM_ERROR("Read EDID byte %d failed err %x\n", i, ret);
kfree(read_buff);