Skip to contentSkip to conversation

serial/serial_core: replace

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

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 serial/serial_core: replace

I would appreciate any comments from the janitors list.

Applys-to: 2.6.7

Description: Use msleep() instead of schedule_timeout() to guarantee the task delays for the desired time.

drivers/serial/serial_core.c +3 -5
@@ -32,6 +32,7 @@
 #include <linux/smp_lock.h>
 #include <linux/device.h>
 #include <linux/serial.h> /* for serial_state and serial_icounter_struct */
+#include <linux/delay.h>
 
 #include <asm/irq.h>
 #include <asm/uaccess.h>
@@ -1910,11 +1911,8 @@ int uart_suspend_port(struct uart_driver
 		/*
 		 * Wait for the transmitter to empty.
 		 */
-		while (!ops->tx_empty(port)) {
-			set_current_state(TASK_UNINTERRUPTIBLE);
-			schedule_timeout(10*HZ/1000);
-		}
-		set_current_state(TASK_RUNNING);
+		while (!ops->tx_empty(port))
+			msleep(10);
 
 		ops->shutdown(port);
 	}

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