ppc/serial_sicc: use poll_event*() interface
RFC PATCH 4/5 ppc/serial_sicc: use poll_event*() interface
Hi,
Description: Use new poll_event*() interface to encapsulate sleep-loops.
Signed-off-by Nishanth Aravamudan <[email protected]>
arch/ppc/4xx_io/serial_sicc.c +8 -10
@@ -1500,16 +1500,14 @@ static void siccuart_wait_until_sent(strpr_debug ("siccuart_wait_until_sent(%d), jiff=%lu, expire=%lu char_time=%lu...\n" , tty->index, jiffies, expire, char_time); -while ((readb (info->port->uart_base +BL_SICC_LSR ) & _LSR_TX_ALL) != - _LSR_TX_ALL) { -set_current_state (TASK_INTERRUPTIBLE ); -schedule_timeout (char_time); -if (signal_pending (current)) -break ; -if (timeout &&time_after (jiffies, expire)) -break ; - } -set_current_state (TASK_RUNNING ); +if (timeout) +poll_event_interruptible_timeout (((readb (info->port->uart_base + +BL_SICC_LSR ) & _LSR_TX_ALL) == _LSR_TX_ALL), +jiffies_to_msecs (char_time), timeout); +else +poll_event_interruptible (((readb (info->port->uart_base + +BL_SICC_LSR ) & _LSR_TX_ALL) == _LSR_TX_ALL), +jiffies_to_msecs (char_time)); }static void siccuart_hangup (struct tty_struct *tty)
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors