[Linux-parport] Re: [patch 1/4] parport/ieee1284_ops: replace schedule_timeout() with msleep_interruptible()

Phil Blundell pb at reciva.com
Mon Jun 20 18:21:24 EDT 2005


This patch is fine.  Thanks.

p.

On Mon, 2005-06-20 at 23:54 +0200, domen at coderock.org wrote:
> plain text document attachment
> (msleep_interruptible-drivers_parport_ieee1284_ops.patch)
> From: Nishanth Aravamudan <nacc at us.ibm.com>
> 
> 
> 
> Use msleep_interruptible() instead of schedule_timeout() to
> guarantee the task delays as expected.
> 
> Signed-off-by: Nishanth Aravamudan <nacc at us.ibm.com>
> Signed-off-by: Maximilian Attems <janitor at sternwelten.at>
> Signed-off-by: Domen Puncer <domen at coderock.org>
> ---
>  ieee1284_ops.c |    6 ++----
>  1 files changed, 2 insertions(+), 4 deletions(-)
> 
> Index: quilt/drivers/parport/ieee1284_ops.c
> ===================================================================
> --- quilt.orig/drivers/parport/ieee1284_ops.c
> +++ quilt/drivers/parport/ieee1284_ops.c
> @@ -97,8 +97,7 @@ size_t parport_ieee1284_write_compat (st
>                             our interrupt handler called. */
>  			if (count && no_irq) {
>  				parport_release (dev);
> -				__set_current_state (TASK_INTERRUPTIBLE);
> -				schedule_timeout (wait);
> +				msleep_interruptible(jiffies_to_msecs(wait));
>  				parport_claim_or_block (dev);
>  			}
>  			else
> @@ -542,8 +541,7 @@ size_t parport_ieee1284_ecp_read_data (s
>  			/* Yield the port for a while. */
>  			if (count && dev->port->irq != PARPORT_IRQ_NONE) {
>  				parport_release (dev);
> -				__set_current_state (TASK_INTERRUPTIBLE);
> -				schedule_timeout ((HZ + 24) / 25);
> +				msleep_interruptible(40);
>  				parport_claim_or_block (dev);
>  			}
>  			else
> 
> --




More information about the Linux-parport mailing list