diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2014-07-18 02:50:43 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-07-22 19:34:33 -0400 |
commit | 2fbe6c5e3e7f8d698d97984a9dce4f05c3d940ed (patch) | |
tree | 72dd2ec323571f945f5eb203c9c592b709738645 | |
parent | aef9a7bd9b676f797dd5cefd43deb30d36b976a9 (diff) |
serial: altera_jtaguart: Fix putchar function passed to uart_console_write()
Commit 3d1c90d48cbe335a ("serial: altera_jtaguart: Adpot
uart_console_write()") introduced the usage of uart_console_write() but
didn't change the signature of altera_jtaguart_console_putc() to take a
pointer to struct uart_port instead of struct console, breaking the
driver's console support and leading to the following warning:
> drivers/tty/serial/altera_jtaguart.c: In function 'altera_jtaguart_console_write':
> >> drivers/tty/serial/altera_jtaguart.c:350:2: warning: passing argument 4 of 'uart_console_write' from incompatible pointer type [enabled by default]
> uart_console_write(port, s, count, altera_jtaguart_console_putc);
> ^
> In file included from drivers/tty/serial/altera_jtaguart.c:25:0:
> include/linux/serial_core.h:317:6: note: expected 'void (*)(struct uart_port *, int)' but argument is of type 'void (*)(struct console *, int)'
> void uart_console_write(struct uart_port *port, const char *s,
Fix this by adjusting the signature of altera_jtaguart_console_putc()
accordingly.
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/tty/serial/altera_jtaguart.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/tty/serial/altera_jtaguart.c b/drivers/tty/serial/altera_jtaguart.c index afe2e75695e7..d22e3d98ae23 100644 --- a/drivers/tty/serial/altera_jtaguart.c +++ b/drivers/tty/serial/altera_jtaguart.c | |||
@@ -304,9 +304,8 @@ static struct altera_jtaguart altera_jtaguart_ports[ALTERA_JTAGUART_MAXPORTS]; | |||
304 | #if defined(CONFIG_SERIAL_ALTERA_JTAGUART_CONSOLE) | 304 | #if defined(CONFIG_SERIAL_ALTERA_JTAGUART_CONSOLE) |
305 | 305 | ||
306 | #if defined(CONFIG_SERIAL_ALTERA_JTAGUART_CONSOLE_BYPASS) | 306 | #if defined(CONFIG_SERIAL_ALTERA_JTAGUART_CONSOLE_BYPASS) |
307 | static void altera_jtaguart_console_putc(struct console *co, int c) | 307 | static void altera_jtaguart_console_putc(struct uart_port *port, int c) |
308 | { | 308 | { |
309 | struct uart_port *port = &(altera_jtaguart_ports + co->index)->port; | ||
310 | unsigned long status; | 309 | unsigned long status; |
311 | unsigned long flags; | 310 | unsigned long flags; |
312 | 311 | ||
@@ -325,9 +324,8 @@ static void altera_jtaguart_console_putc(struct console *co, int c) | |||
325 | spin_unlock_irqrestore(&port->lock, flags); | 324 | spin_unlock_irqrestore(&port->lock, flags); |
326 | } | 325 | } |
327 | #else | 326 | #else |
328 | static void altera_jtaguart_console_putc(struct console *co, int c) | 327 | static void altera_jtaguart_console_putc(struct uart_port *port, int c) |
329 | { | 328 | { |
330 | struct uart_port *port = &(altera_jtaguart_ports + co->index)->port; | ||
331 | unsigned long flags; | 329 | unsigned long flags; |
332 | 330 | ||
333 | spin_lock_irqsave(&port->lock, flags); | 331 | spin_lock_irqsave(&port->lock, flags); |