Skip to contentSkip to conversation

usb/file_storage: replace

PATCH New Nishanth Aravamudan 1 participant 1 message Sep 27, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 4/9 usb/file_storage: replace

Any comments would be appreciated.

Description: Use msleep_interruptible() instead of schedule_timeout() so that the task delays as expected.

drivers/usb/gadget/file_storage.c +2 -2
@@ -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>
@@ -2280,8 +2281,7 @@ static int halt_bulk_in_endpoint(struct 
 		}
 
 		/* 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);
 	}

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors