summaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/clps711x.c
diff options
context:
space:
mode:
authorAlexander Shiyan2012-10-14 09:05:29 +0200
committerGreg Kroah-Hartman2012-10-24 20:39:47 +0200
commitec335526b4bce21f6777d3917d6d67c16009ec63 (patch)
tree72715e120c36bdd08bab9d768f20df51f1525418 /drivers/tty/serial/clps711x.c
parentserial: clps711x: Return valid modem controls for port that not support it (diff)
downloadkernel-qcow2-linux-ec335526b4bce21f6777d3917d6d67c16009ec63.tar.gz
kernel-qcow2-linux-ec335526b4bce21f6777d3917d6d67c16009ec63.tar.xz
kernel-qcow2-linux-ec335526b4bce21f6777d3917d6d67c16009ec63.zip
serial: clps711x: Fix break control handling
Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/clps711x.c')
-rw-r--r--drivers/tty/serial/clps711x.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/tty/serial/clps711x.c b/drivers/tty/serial/clps711x.c
index 7b0e539ee9c0..73505c1edc7d 100644
--- a/drivers/tty/serial/clps711x.c
+++ b/drivers/tty/serial/clps711x.c
@@ -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);
}