Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e0393062 authored by Nicholas Mc Guire's avatar Nicholas Mc Guire Committed by Jiri Kosina
Browse files

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: default avatarNicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 8de29a35
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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;