Re: [patch 9/9]Four new i2c drivers and __init/__exit cleanup to i2c

Jeff Garzik
2002-09-15T23:14:21Z

Albert Cranford wrote:
> --- linux/drivers/i2c/i2c-elektor.c.orig 2002-09-14 22:10:45.000000000 -0400
> +++ linux-2.5.34/drivers/i2c/i2c-elektor.c 2002-09-15 01:18:55.000000000 -0400
> @@ -125,12 +125,12 @@
> int timeout = 2;
>
> if (irq > 0) {
> - cli();
> + local_irq_disable();
> if (pcf_pending == 0) {
> interruptible_sleep_on_timeout(&pcf_wait, timeout*HZ );
> } else
> pcf_pending = 0;
> - sti();
> + local_irq_enable();
> } else {
> udelay(100);
> }

this is _not_ the way to fix... use a proper spinlock