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

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

Use msleep_interruptible() instead of schedule_timeout()
so that the task delays as expected.
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 8e8f500e
......@@ -217,6 +217,7 @@
#include <linux/compiler.h>
#include <linux/completion.h>
#include <linux/dcache.h>
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/fcntl.h>
#include <linux/file.h>
......@@ -2300,8 +2301,7 @@ static int halt_bulk_in_endpoint(struct fsg_dev *fsg)
}
/* Wait for a short time and then try again */
set_current_state(TASK_INTERRUPTIBLE);
if (schedule_timeout(HZ / 10) != 0)
if (msleep_interruptible(100) != 0)
return -EINTR;
rc = usb_ep_set_halt(fsg->bulk_in);
}
......
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