diff options
author | Alexander Shiyan <shc_work@mail.ru> | 2014-03-27 13:38:19 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-04-16 14:17:44 -0700 |
commit | 2f310b8e418ac5eb3833a9f36791c24a97f1f557 (patch) | |
tree | d3ea8c54020a2f5eedef8eed9e995e7c5c329ef3 /drivers/tty/serial/clps711x.c | |
parent | 717f3bbab3c7628736ef738fdbf3d9a28578c26c (diff) | |
download | linux-stable-2f310b8e418ac5eb3833a9f36791c24a97f1f557.tar.gz linux-stable-2f310b8e418ac5eb3833a9f36791c24a97f1f557.tar.bz2 linux-stable-2f310b8e418ac5eb3833a9f36791c24a97f1f557.zip |
Revert "serial: clps711x: Give a chance to perform useful tasks during wait loop"
This reverts commit 63e3ad3252695a2b8c01b6f6c225e4537af08b85,
since this not works as expected and produce runtime error:
BUG: sleeping function called from invalid context at drivers/tty/serial/clps711x.c:379
in_atomic(): 0, irqs_disabled(): 128, pid: 287, name: mount
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.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/drivers/tty/serial/clps711x.c b/drivers/tty/serial/clps711x.c index 5e6fdb1ea73b..14aaea0d4131 100644 --- a/drivers/tty/serial/clps711x.c +++ b/drivers/tty/serial/clps711x.c @@ -368,16 +368,12 @@ static const struct uart_ops uart_clps711x_ops = { static void uart_clps711x_console_putchar(struct uart_port *port, int ch) { struct clps711x_port *s = dev_get_drvdata(port->dev); + u32 sysflg = 0; /* Wait for FIFO is not full */ - while (1) { - u32 sysflg = 0; - + do { regmap_read(s->syscon, SYSFLG_OFFSET, &sysflg); - if (!(sysflg & SYSFLG_UTXFF)) - break; - cond_resched(); - } + } while (sysflg & SYSFLG_UTXFF); writew(ch, port->membase + UARTDR_OFFSET); } @@ -387,18 +383,14 @@ static void uart_clps711x_console_write(struct console *co, const char *c, { struct uart_port *port = clps711x_uart.state[co->index].uart_port; struct clps711x_port *s = dev_get_drvdata(port->dev); + u32 sysflg = 0; uart_console_write(port, c, n, uart_clps711x_console_putchar); /* Wait for transmitter to become empty */ - while (1) { - u32 sysflg = 0; - + do { regmap_read(s->syscon, SYSFLG_OFFSET, &sysflg); - if (!(sysflg & SYSFLG_UBUSY)) - break; - cond_resched(); - } + } while (sysflg & SYSFLG_UBUSY); } static int uart_clps711x_console_setup(struct console *co, char *options) |