Skip to content
Commit 2fbe6c5e authored by Tobias Klauser's avatar Tobias Klauser Committed by Greg Kroah-Hartman
Browse files

serial: altera_jtaguart: Fix putchar function passed to uart_console_write()



Commit 3d1c90d4 ("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: default avatarkbuild test robot <fengguang.wu@intel.com>
Reported-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarTobias Klauser <tklauser@distanz.ch>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent aef9a7bd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment