Re: [patch 3/4] 2.5.30 i2c updates

From: Russell King (rmk@arm.linux.org.uk)
Date: Fri Aug 09 2002 - 03:40:10 EST


btw, I'm Russell, not Rusty. 8)

On Thu, Aug 08, 2002 at 11:23:07PM -0400, Albert Cranford wrote:
> --- linux-2.5.26/drivers/i2c/i2c-elektor.c.orig 2002-07-05 19:42:02.000000000 -0400
> +++ linux/drivers/i2c/i2c-elektor.c 2002-08-07 22:39:08.000000000 -0400
>...
> @@ -121,12 +118,12 @@
> int timeout = 2;
>
> if (irq > 0) {
> - cli();
> + spin_lock_irq(&irq_driver_lock);
> if (pcf_pending == 0) {
> interruptible_sleep_on_timeout(&pcf_wait, timeout*HZ );

Two points here:

- Sleeping with interrupts disabled.
- Use of interruptible_sleep_on_timeout().

-- 
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html

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



This archive was generated by hypermail 2b29 : Thu Aug 15 2002 - 22:00:18 EST