diff options
author | Nicholas Mc Guire <hofrat@osadl.org> | 2015-05-02 11:55:15 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2015-05-07 04:32:22 -0400 |
commit | e03930620ae856a6ed79007207337d10011ecb36 (patch) | |
tree | 27ead853b3d6b94c98f6a15633fbb31d34b772eb /drivers/hid/hid-lg.c | |
parent | 8de29a35dc840a05e451ad035bcb06e21ccf605f (diff) |
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 <hofrat@osadl.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-lg.c')
-rw-r--r-- | drivers/hid/hid-lg.c | 3 |
1 files changed, 2 insertions, 1 deletions
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) | |||
700 | /* insert a little delay of 10 jiffies ~ 40ms */ | 700 | /* insert a little delay of 10 jiffies ~ 40ms */ |
701 | wait_queue_head_t wait; | 701 | wait_queue_head_t wait; |
702 | init_waitqueue_head (&wait); | 702 | init_waitqueue_head (&wait); |
703 | wait_event_interruptible_timeout(wait, 0, 10); | 703 | wait_event_interruptible_timeout(wait, 0, |
704 | msecs_to_jiffies(40)); | ||
704 | 705 | ||
705 | /* Select random Address */ | 706 | /* Select random Address */ |
706 | buf[1] = 0xB2; | 707 | buf[1] = 0xB2; |