Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[IRDA]: sti/cli removal from EP7211 IrDA driver

This patch replaces the deprecated sti/cli routines with the corresponding
spin_lock ones.

Signed-off-by: David chosrova <david.chosrova@libertysurf.fr>
Signed-off-by: Samuel Ortiz <samuel.ortiz@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

David chosrova and committed by
David S. Miller
03488826 0ed79c9b

+7 -4
+7 -4
drivers/net/irda/ep7211_ir.c
··· 8 8 #include <linux/delay.h> 9 9 #include <linux/tty.h> 10 10 #include <linux/init.h> 11 + #include <linux/spinlock.h> 11 12 12 13 #include <net/irda/irda.h> 13 14 #include <net/irda/irda_device.h> ··· 24 23 static int ep7211_ir_change_speed(struct irda_task *task); 25 24 static int ep7211_ir_reset(struct irda_task *task); 26 25 26 + static DEFINE_SPINLOCK(ep7211_lock); 27 + 27 28 static struct dongle_reg dongle = { 28 29 .type = IRDA_EP7211_IR, 29 30 .open = ep7211_ir_open, ··· 39 36 { 40 37 unsigned int syscon1, flags; 41 38 42 - save_flags(flags); cli(); 39 + spin_lock_irqsave(&ep7211_lock, flags); 43 40 44 41 /* Turn on the SIR encoder. */ 45 42 syscon1 = clps_readl(SYSCON1); ··· 49 46 /* XXX: We should disable modem status interrupts on the first 50 47 UART (interrupt #14). */ 51 48 52 - restore_flags(flags); 49 + spin_unlock_irqrestore(&ep7211_lock, flags); 53 50 } 54 51 55 52 static void ep7211_ir_close(dongle_t *self) 56 53 { 57 54 unsigned int syscon1, flags; 58 55 59 - save_flags(flags); cli(); 56 + spin_lock_irqsave(&ep7211_lock, flags); 60 57 61 58 /* Turn off the SIR encoder. */ 62 59 syscon1 = clps_readl(SYSCON1); ··· 66 63 /* XXX: If we've disabled the modem status interrupts, we should 67 64 reset them back to their original state. */ 68 65 69 - restore_flags(flags); 66 + spin_unlock_irqrestore(&ep7211_lock, flags); 70 67 } 71 68 72 69 /*