提交 c6eb69ac 编写于 作者: D Dan Carpenter 提交者: Linus Torvalds

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: NDan Carpenter <error27@gmail.com>
Cc: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 cdeebadd
...@@ -1768,7 +1768,7 @@ static int mxser_ioctl(struct tty_struct *tty, struct file *file, ...@@ -1768,7 +1768,7 @@ static int mxser_ioctl(struct tty_struct *tty, struct file *file,
int len, lsr; int len, lsr;
len = mxser_chars_in_buffer(tty); len = mxser_chars_in_buffer(tty);
spin_lock(&info->slock); spin_lock_irq(&info->slock);
lsr = inb(info->ioaddr + UART_LSR) & UART_LSR_THRE; lsr = inb(info->ioaddr + UART_LSR) & UART_LSR_THRE;
spin_unlock_irq(&info->slock); spin_unlock_irq(&info->slock);
len += (lsr ? 0 : 1); len += (lsr ? 0 : 1);
...@@ -1778,12 +1778,12 @@ static int mxser_ioctl(struct tty_struct *tty, struct file *file, ...@@ -1778,12 +1778,12 @@ static int mxser_ioctl(struct tty_struct *tty, struct file *file,
case MOXA_ASPP_MON: { case MOXA_ASPP_MON: {
int mcr, status; int mcr, status;
spin_lock(&info->slock); spin_lock_irq(&info->slock);
status = mxser_get_msr(info->ioaddr, 1, tty->index); status = mxser_get_msr(info->ioaddr, 1, tty->index);
mxser_check_modem_status(tty, info, status); mxser_check_modem_status(tty, info, status);
mcr = inb(info->ioaddr + UART_MCR); mcr = inb(info->ioaddr + UART_MCR);
spin_unlock(&info->slock); spin_unlock_irq(&info->slock);
if (mcr & MOXA_MUST_MCR_XON_FLAG) if (mcr & MOXA_MUST_MCR_XON_FLAG)
info->mon_data.hold_reason &= ~NPPI_NOTIFY_XOFFHOLD; info->mon_data.hold_reason &= ~NPPI_NOTIFY_XOFFHOLD;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册