From e03930620ae856a6ed79007207337d10011ecb36 Mon Sep 17 00:00:00 2001 From: Nicholas Mc Guire Date: Sat, 2 May 2015 17:55:15 +0200 Subject: HID: make timeout HZ independent wait_event_interruptible_timeout() expects a timeout in jiffies so the numeric constant becomes HZ dependent - put it through msecs_to_jiffies() to make it HZ independent. Signed-off-by: Nicholas Mc Guire Signed-off-by: Jiri Kosina --- drivers/hid/hid-lg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/hid/hid-lg.c b/drivers/hid/hid-lg.c index b86c18e651ed..2671de952e62 100644 --- a/drivers/hid/hid-lg.c +++ b/drivers/hid/hid-lg.c @@ -700,7 +700,8 @@ static int lg_probe(struct hid_device *hdev, const struct hid_device_id *id) /* insert a little delay of 10 jiffies ~ 40ms */ wait_queue_head_t wait; init_waitqueue_head (&wait); - wait_event_interruptible_timeout(wait, 0, 10); + wait_event_interruptible_timeout(wait, 0, + msecs_to_jiffies(40)); /* Select random Address */ buf[1] = 0xB2; -- cgit v1.2.3