Signed-off-by: James Nelson <james4765@xxxxxxxxx> diff -urN --exclude='*~' linux-2.6.10-mm2-original/drivers/net/irda/ep7211_ir.c linux-2.6.10-mm2/drivers/net/irda/ep7211_ir.c --- linux-2.6.10-mm2-original/drivers/net/irda/ep7211_ir.c 2005-01-08 12:16:34.000000000 -0500 +++ linux-2.6.10-mm2/drivers/net/irda/ep7211_ir.c 2005-01-11 17:19:32.000000000 -0500 @@ -18,6 +18,8 @@ #define MIN_DELAY 25 /* 15 us, but wait a little more to be sure */ #define MAX_DELAY 10000 /* 1 ms */ +static spinlock_t ep7211_lock = SPIN_LOCK_UNLOCKED; + static void ep7211_ir_open(dongle_t *self, struct qos_info *qos); static void ep7211_ir_close(dongle_t *self); static int ep7211_ir_change_speed(struct irda_task *task); @@ -36,7 +38,7 @@ { unsigned int syscon1, flags; - save_flags(flags); cli(); + spin_lock_irqsave(&ep7211_lock, flags); /* Turn on the SIR encoder. */ syscon1 = clps_readl(SYSCON1); @@ -46,14 +48,14 @@ /* XXX: We should disable modem status interrupts on the first UART (interrupt #14). */ - restore_flags(flags); + spin_unlock_irqrestore(&ep7211_lock, flags); } static void ep7211_ir_close(dongle_t *self) { unsigned int syscon1, flags; - save_flags(flags); cli(); + spin_lock_irqsave(&ep7211_lock, flags); /* Turn off the SIR encoder. */ syscon1 = clps_readl(SYSCON1); @@ -63,7 +65,7 @@ /* XXX: If we've disabled the modem status interrupts, we should reset them back to their original state. */ - restore_flags(flags); + spin_unlock_irqrestore(&ep7211_lock, flags); } /* - : send the line "unsubscribe linux-net" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html