Commit 888df350 authored by Nishanth Aravamudan's avatar Nishanth Aravamudan Committed by Greg Kroah-Hartman

[PATCH] usb/uss720: replace schedule_timeout() with msleep_interruptible()

Use msleep_interruptible() instead of schedule_timeout() to guarantee
the task delays as expected.
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 6b2d5150
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
#include <linux/parport.h> #include <linux/parport.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/usb.h> #include <linux/usb.h>
#include <linux/delay.h>
/* /*
* Version Information * Version Information
...@@ -159,8 +160,7 @@ static int change_mode(struct parport *pp, int m) ...@@ -159,8 +160,7 @@ static int change_mode(struct parport *pp, int m)
if (time_after_eq (jiffies, expire)) if (time_after_eq (jiffies, expire))
/* The FIFO is stuck. */ /* The FIFO is stuck. */
return -EBUSY; return -EBUSY;
set_current_state(TASK_INTERRUPTIBLE); msleep_interruptible(10);
schedule_timeout((HZ + 99) / 100);
if (signal_pending (current)) if (signal_pending (current))
break; break;
} }
......
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