Commit 2e2fa887 authored by Albert Cranford's avatar Albert Cranford Committed by Linus Torvalds

[PATCH] 2.5.31 reverse spin_lock_irq for i2c-elektor.c

Pleaase reverse deadlocking change to i2c-elektor.c
parent 44260240
...@@ -57,7 +57,6 @@ static int i2c_debug = 0; ...@@ -57,7 +57,6 @@ static int i2c_debug = 0;
static wait_queue_head_t pcf_wait; static wait_queue_head_t pcf_wait;
static int pcf_pending; static int pcf_pending;
spinlock_t irq_driver_lock = SPIN_LOCK_UNLOCKED;
/* ----- global defines ----------------------------------------------- */ /* ----- global defines ----------------------------------------------- */
#define DEB(x) if (i2c_debug>=1) x #define DEB(x) if (i2c_debug>=1) x
...@@ -118,12 +117,12 @@ static void pcf_isa_waitforpin(void) { ...@@ -118,12 +117,12 @@ static void pcf_isa_waitforpin(void) {
int timeout = 2; int timeout = 2;
if (irq > 0) { if (irq > 0) {
spin_lock_irq(&irq_driver_lock); cli();
if (pcf_pending == 0) { if (pcf_pending == 0) {
interruptible_sleep_on_timeout(&pcf_wait, timeout*HZ ); interruptible_sleep_on_timeout(&pcf_wait, timeout*HZ );
} else } else
pcf_pending = 0; pcf_pending = 0;
spin_unlock_irq(&irq_driver_lock); sti();
} else { } else {
udelay(100); udelay(100);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment