diff options
author | Vineet Gupta <Vineet.Gupta1@synopsys.com> | 2014-07-11 09:01:37 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-07-11 20:49:46 -0400 |
commit | f363ca2fc8d12ebaad1a8bdae0f164c17c747b89 (patch) | |
tree | 15538acb7caf0c49fcf8fff23bf08f4de667b277 /drivers/tty/serial | |
parent | 2970b7f5ea3cea2f169ca23fd863e24d03748ffd (diff) |
serial/arc: Fix warning with CONSOLE_POLL
| drivers/tty/serial/arc_uart.c:516:2: warning: (near initialization for 'arc_serial_pops.poll_put_char') [enabled by default]
This partially undoes "serial/arc: use uart_console_write() helper" by
restoring the prototpye of poll helper and use a different one in
uart_console_write()
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial')
-rw-r--r-- | drivers/tty/serial/arc_uart.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/drivers/tty/serial/arc_uart.c b/drivers/tty/serial/arc_uart.c index 3a504fb9c9e8..f8dc7d381956 100644 --- a/drivers/tty/serial/arc_uart.c +++ b/drivers/tty/serial/arc_uart.c | |||
@@ -442,18 +442,16 @@ static void arc_serial_config_port(struct uart_port *port, int flags) | |||
442 | port->type = PORT_ARC; | 442 | port->type = PORT_ARC; |
443 | } | 443 | } |
444 | 444 | ||
445 | #if defined(CONFIG_CONSOLE_POLL) || defined(CONFIG_SERIAL_ARC_CONSOLE) | 445 | #ifdef CONFIG_CONSOLE_POLL |
446 | 446 | ||
447 | static void arc_serial_poll_putchar(struct uart_port *port, int chr) | 447 | static void arc_serial_poll_putchar(struct uart_port *port, unsigned char chr) |
448 | { | 448 | { |
449 | while (!(UART_GET_STATUS(port) & TXEMPTY)) | 449 | while (!(UART_GET_STATUS(port) & TXEMPTY)) |
450 | cpu_relax(); | 450 | cpu_relax(); |
451 | 451 | ||
452 | UART_SET_DATA(port, (unsigned char)chr); | 452 | UART_SET_DATA(port, chr); |
453 | } | 453 | } |
454 | #endif | ||
455 | 454 | ||
456 | #ifdef CONFIG_CONSOLE_POLL | ||
457 | static int arc_serial_poll_getchar(struct uart_port *port) | 455 | static int arc_serial_poll_getchar(struct uart_port *port) |
458 | { | 456 | { |
459 | unsigned char chr; | 457 | unsigned char chr; |
@@ -519,6 +517,14 @@ static int arc_serial_console_setup(struct console *co, char *options) | |||
519 | return uart_set_options(port, co, baud, parity, bits, flow); | 517 | return uart_set_options(port, co, baud, parity, bits, flow); |
520 | } | 518 | } |
521 | 519 | ||
520 | static void arc_serial_console_putchar(struct uart_port *port, int ch) | ||
521 | { | ||
522 | while (!(UART_GET_STATUS(port) & TXEMPTY)) | ||
523 | cpu_relax(); | ||
524 | |||
525 | UART_SET_DATA(port, (unsigned char)ch); | ||
526 | } | ||
527 | |||
522 | /* | 528 | /* |
523 | * Interrupts are disabled on entering | 529 | * Interrupts are disabled on entering |
524 | */ | 530 | */ |
@@ -529,7 +535,7 @@ static void arc_serial_console_write(struct console *co, const char *s, | |||
529 | unsigned long flags; | 535 | unsigned long flags; |
530 | 536 | ||
531 | spin_lock_irqsave(&port->lock, flags); | 537 | spin_lock_irqsave(&port->lock, flags); |
532 | uart_console_write(port, s, count, arc_serial_poll_putchar); | 538 | uart_console_write(port, s, count, arc_serial_console_putchar); |
533 | spin_unlock_irqrestore(&port->lock, flags); | 539 | spin_unlock_irqrestore(&port->lock, flags); |
534 | } | 540 | } |
535 | 541 | ||
@@ -548,7 +554,7 @@ static __init void arc_early_serial_write(struct console *con, const char *s, | |||
548 | { | 554 | { |
549 | struct earlycon_device *dev = con->data; | 555 | struct earlycon_device *dev = con->data; |
550 | 556 | ||
551 | uart_console_write(&dev->port, s, n, arc_serial_poll_putchar); | 557 | uart_console_write(&dev->port, s, n, arc_serial_console_putchar); |
552 | } | 558 | } |
553 | 559 | ||
554 | static int __init arc_early_console_setup(struct earlycon_device *dev, | 560 | static int __init arc_early_console_setup(struct earlycon_device *dev, |