Skip to content

Commit 7583028

Browse files
Jinjie RuanThomas Zimmermann
authored andcommitted
drm: gm12u320: Fix the timeout usage for usb_bulk_msg()
The timeout arg of usb_bulk_msg() is ms already, which has been converted to jiffies by msecs_to_jiffies() in usb_start_wait_urb(). So fix the usage by removing the redundant msecs_to_jiffies() in the macros. And as Hans suggested, also remove msecs_to_jiffies() for the IDLE_TIMEOUT macro to make it consistent here and so change IDLE_TIMEOUT to msecs_to_jiffies(IDLE_TIMEOUT) where it is used. Fixes: e4f86e4 ("drm: Add Grain Media GM12U320 driver v2") Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com> Suggested-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20230904021421.1663892-1-ruanjinjie@huawei.com
1 parent e2884fe commit 7583028

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/gpu/drm/tiny/gm12u320.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ MODULE_PARM_DESC(eco_mode, "Turn on Eco mode (less bright, more silent)");
7070
#define READ_STATUS_SIZE 13
7171
#define MISC_VALUE_SIZE 4
7272

73-
#define CMD_TIMEOUT msecs_to_jiffies(200)
74-
#define DATA_TIMEOUT msecs_to_jiffies(1000)
75-
#define IDLE_TIMEOUT msecs_to_jiffies(2000)
76-
#define FIRST_FRAME_TIMEOUT msecs_to_jiffies(2000)
73+
#define CMD_TIMEOUT 200
74+
#define DATA_TIMEOUT 1000
75+
#define IDLE_TIMEOUT 2000
76+
#define FIRST_FRAME_TIMEOUT 2000
7777

7878
#define MISC_REQ_GET_SET_ECO_A 0xff
7979
#define MISC_REQ_GET_SET_ECO_B 0x35
@@ -389,7 +389,7 @@ static void gm12u320_fb_update_work(struct work_struct *work)
389389
* switches back to showing its logo.
390390
*/
391391
queue_delayed_work(system_long_wq, &gm12u320->fb_update.work,
392-
IDLE_TIMEOUT);
392+
msecs_to_jiffies(IDLE_TIMEOUT));
393393

394394
return;
395395
err:

0 commit comments

Comments
 (0)