Commit 2429d09e authored by Maximilian Attems's avatar Maximilian Attems Committed by Greg Kroah-Hartman

[PATCH] USB: tiglusb: replace schedule_timeout() with msleep_interruptible()

Description: Use msleep_interruptible() instead of schedule_timeout() to
guarantee the task delays as expected.
Signed-off-by: default avatarNishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: default avatarMaximilian Attems <janitor@sternwelten.at>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 07868ac7
...@@ -116,8 +116,7 @@ tiglusb_open (struct inode *inode, struct file *filp) ...@@ -116,8 +116,7 @@ tiglusb_open (struct inode *inode, struct file *filp)
return -EBUSY; return -EBUSY;
} }
set_current_state(TASK_INTERRUPTIBLE); msleep_interruptible(500);
schedule_timeout (HZ / 2);
if (signal_pending (current)) { if (signal_pending (current)) {
return -EAGAIN; return -EAGAIN;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment