Skip to contentSkip to conversation

mxser: spin_lock() => spin_lock_irq()

PATCH In review Dan Carpenter 2 participants 2 messages Apr 1, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mxser: spin_lock() => spin_lock_irq()

This should be spin_lock_irq() to match the spin_unlock_irq(). Originally it was a lock_kernel() but we switched everything to spin_lock_irq() last November.

drivers/char/mxser.c +1 -1
index e0c5d2a..ecb2d8b 100644
@@ -1768,7 +1768,7 @@ static int mxser_ioctl(struct tty_struct *tty, struct file *file,
 		int len, lsr;
 
 		len = mxser_chars_in_buffer(tty);
-		spin_lock(&info->slock);
+		spin_lock_irq(&info->slock);
 		lsr = inb(info->ioaddr + UART_LSR) & UART_LSR_THRE;
 		spin_unlock_irq(&info->slock);
 		len += (lsr ? 0 : 1);
#1 lore raw
Quoted 11 lines · Dan Carpenter

This should be spin_lock_irq() to match the spin_unlock_irq(). Originally it was a lock_kernel() but we switched everything to spin_lock_irq() last November.

drivers/char/mxser.c +0 -0
index e0c5d2a..ecb2d8b 100644

drivers/char/mxser.c static int mxser_ioctl(struct tty_struct *tty, struct file *file, · line 1771

Quoted 5 lines
drivers/char/mxser.c +1 -1
@@ -1768,7 +1768,7 @@ static int mxser_ioctl(struct tty_struct *tty, struct file *file,
  		int len, lsr;
 
  		len = mxser_chars_in_buffer(tty);
-		spin_lock(&info->slock);
+		spin_lock_irq(&info->slock);

Hmm, and there is one more error in the MOXA_ASPP_MON case. Interrupts are not disabled at all there. Could you fix that too?

Thanks.