Skip to contentSkip to conversation

serial/68328serial: replace

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

lore
Share & tools
lore
#0 lore raw

PATCH 1/6 serial/68328serial: replace

Any comments would be appreciated.

Description: Use msleep_interruptible() instead of schedule_timeout() to guarantee the task delays as expected.

drivers/serial/68328serial.c +3 -3
@@ -34,6 +34,7 @@
 #include <linux/keyboard.h>
 #include <linux/init.h>
 #include <linux/pm.h>
+#include <linux/delay.h>
 
 #include <asm/io.h>
 #include <asm/irq.h>
@@ -1011,7 +1012,7 @@ static void send_break(	struct m68k_seri
         unsigned long flags;
         if (!info->port)
                 return;
-        current->state = TASK_INTERRUPTIBLE;
+        set_current_state(TASK_INTERRUPTIBLE);
         save_flags(flags);
         cli();
 #ifdef USE_INTS	
@@ -1200,8 +1201,7 @@ static void rs_close(struct tty_struct *
 	}
 	if (info->blocked_open) {
 		if (info->close_delay) {
-			current->state = TASK_INTERRUPTIBLE;
-			schedule_timeout(info->close_delay);
+			msleep_interruptible(jiffies_to_msecs(info->close_delay));
 		}
 		wake_up_interruptible(&info->open_wait);
 	}

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