[EMAIL PROTECTED] wrote:
>
> Use msleep() instead of schedule_timeout() to guarantee the task
>  delays as expected. The current code uses TASK_INTERRUPTIBLE, but does not 
> care
>  about signals, so I believe msleep() should be ok.
> 
>  Signed-off-by: Nishanth Aravamudan <[EMAIL PROTECTED]>
>  Signed-off-by: Domen Puncer <[EMAIL PROTECTED]>
>  ---
> 
> 
>   kj-domen/drivers/serial/crisv10.c |    6 ++----
>   1 files changed, 2 insertions(+), 4 deletions(-)
> 
>  diff -puN drivers/serial/crisv10.c~msleep-drivers_serial_crisv10 
> drivers/serial/crisv10.c
>  --- kj/drivers/serial/crisv10.c~msleep-drivers_serial_crisv10        
> 2005-03-05 16:10:52.000000000 +0100
>  +++ kj-domen/drivers/serial/crisv10.c        2005-03-05 16:10:52.000000000 
> +0100
>  @@ -3757,10 +3757,8 @@ rs_write(struct tty_struct * tty, int fr
>               e100_enable_rx_irq(info);
>   #endif
>   
>  -            if (info->rs485.delay_rts_before_send > 0) {
>  -                    set_current_state(TASK_INTERRUPTIBLE);
>  -                    schedule_timeout((info->rs485.delay_rts_before_send * 
> HZ)/1000);
>  -            }
>  +            if (info->rs485.delay_rts_before_send > 0)
>  +                    msleep(info->rs485.delay_rts_before_send);

Behavioural change: we'll no longer break out of the sleep if a signal is
pending.  Which probably means you fixed a bug ;)

Please work it with Mikael.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to