Skip to content

Commit

Permalink
serial: clps711x: Fix break control handling
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Alexander Shiyan authored and Greg Kroah-Hartman committed Oct 24, 2012
1 parent 1593daf commit ec33552
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/tty/serial/clps711x.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,14 @@ static void clps711xuart_break_ctl(struct uart_port *port, int break_state)
unsigned int ubrlcr;

spin_lock_irqsave(&port->lock, flags);

ubrlcr = clps_readl(UBRLCR(port));
if (break_state == -1)
if (break_state)
ubrlcr |= UBRLCR_BREAK;
else
ubrlcr &= ~UBRLCR_BREAK;
clps_writel(ubrlcr, UBRLCR(port));

spin_unlock_irqrestore(&port->lock, flags);
}

Expand Down

0 comments on commit ec33552

Please sign in to comment.