]> git.hungrycats.org Git - linux/commitdiff
[SUNZILOG]: Fix locking in cases where UART layer has grabbed the lock already.
authorBen Collins <bcollins@debian.org>
Fri, 23 Jan 2004 03:58:16 +0000 (19:58 -0800)
committerBen Collins <bcollins@debian.org>
Fri, 23 Jan 2004 03:58:16 +0000 (19:58 -0800)
drivers/serial/sunzilog.c

index 1f343cc2b9528fe2b4ca6717fd8018ae63cc0929..8fd606cf0a310a78eade0ae3c1b04ae38dc2f8ad 100644 (file)
@@ -723,36 +723,28 @@ static void sunzilog_start_tx(struct uart_port *port, unsigned int tty_start)
        }
 }
 
-/* The port lock is not held.  */
+/* The port lock is held.  */
 static void sunzilog_stop_rx(struct uart_port *port)
 {
        struct uart_sunzilog_port *up = UART_ZILOG(port);
        struct zilog_channel *channel;
-       unsigned long flags;
 
        if (ZS_IS_CONS(up))
                return;
 
-       spin_lock_irqsave(&port->lock, flags);
-
        channel = ZILOG_CHANNEL_FROM_PORT(port);
 
        /* Disable all RX interrupts.  */
        up->curregs[R1] &= ~RxINT_MASK;
        sunzilog_maybe_update_regs(up, channel);
-
-       spin_unlock_irqrestore(&port->lock, flags);
 }
 
-/* The port lock is not held.  */
+/* The port lock is held.  */
 static void sunzilog_enable_ms(struct uart_port *port)
 {
        struct uart_sunzilog_port *up = (struct uart_sunzilog_port *) port;
        struct zilog_channel *channel = ZILOG_CHANNEL_FROM_PORT(port);
        unsigned char new_reg;
-       unsigned long flags;
-
-       spin_lock_irqsave(&port->lock, flags);
 
        new_reg = up->curregs[R15] | (DCDIE | SYNCIE | CTSIE);
        if (new_reg != up->curregs[R15]) {
@@ -761,8 +753,6 @@ static void sunzilog_enable_ms(struct uart_port *port)
                /* NOTE: Not subject to 'transmitter active' rule.  */ 
                write_zsreg(channel, R15, up->curregs[R15]);
        }
-
-       spin_unlock_irqrestore(&port->lock, flags);
 }
 
 /* The port lock is not held.  */