From: Dan Carpenter Date: Tue, 6 Apr 2010 21:34:50 +0000 (-0700) Subject: mxser: spin_lock() => spin_lock_irq() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=c6eb69acfdfe258b4a3f69fa5ced8928bbebdba9;p=openwrt%2Fstaging%2Fblogic.git 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. [akpm@linux-foundation.org: fix the MOXA_ASPP_MON case too (per Jiri)] Signed-off-by: Dan Carpenter Cc: Jiri Slaby Cc: Alan Cox Cc: Greg KH Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c index 95c9f54f3d30..47023053ee85 100644 --- a/drivers/char/mxser.c +++ b/drivers/char/mxser.c @@ -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); @@ -1778,12 +1778,12 @@ static int mxser_ioctl(struct tty_struct *tty, struct file *file, case MOXA_ASPP_MON: { int mcr, status; - spin_lock(&info->slock); + spin_lock_irq(&info->slock); status = mxser_get_msr(info->ioaddr, 1, tty->index); mxser_check_modem_status(tty, info, status); mcr = inb(info->ioaddr + UART_MCR); - spin_unlock(&info->slock); + spin_unlock_irq(&info->slock); if (mcr & MOXA_MUST_MCR_XON_FLAG) info->mon_data.hold_reason &= ~NPPI_NOTIFY_XOFFHOLD;