serial:sunplus-uart:Fix compile error while CONFIG_SERIAL_SUNPLUS_CONSOLE=n
Subsystems (2)
Hammer Hsieh
maintainerPATCH 1/1 serial:sunplus-uart:Fix compile error while CONFIG_SERIAL_SUNPLUS_CONSOLE=n
1. Fix implicit declaration of function 'wait_for_xmitr' issue.
2. Fix 'sunplus_uart_console' undeclared here issue.
3. Fix use of undeclared identifier 'sunplus_uart_console' issue.
Fixes 9e8d547032("serial:sunplus-uart:Fix compile error for SP7021")
Reported-by Randy Dunlap <[email protected]>
Reported-by kernel test robot <[email protected]>
Signed-off-by Hammer Hsieh <[email protected]>
--- drivers/tty/serial/sunplus-uart.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/tty/serial/sunplus-uart.c +6 -2
@@ -441,7 +441,7 @@ static int sunplus_verify_port(struct uart_port *port, struct serial_struct *serreturn 0 ; } -#ifdef CONFIG_SERIAL_SUNPLUS_CONSOLE +#if defined(CONFIG_SERIAL_SUNPLUS_CONSOLE ) || defined(CONFIG_CONSOLE_POLL )static void wait_for_xmitr (struct uart_port *port) {unsigned int val;
@@ -562,6 +562,10 @@ static struct console sunplus_uart_console = { .index = -1, .data = &sunplus_uart_driver }; + +#define SERIAL_SUNPLUS_CONSOLE (&sunplus_uart_console) +#else +#define SERIAL_SUNPLUS_CONSOLE NULL#endif static struct uart_driver sunplus_uart_driver = {
@@ -571,7 +575,7 @@ static struct uart_driver sunplus_uart_driver = { .major = TTY_MAJOR, .minor = 64, .nr = SUP_UART_NR, - .cons = &sunplus_uart_console, + .cons = SERIAL_SUNPLUS_CONSOLE, };static void sunplus_uart_disable_unprepare (void *data)
Signature · 1 line
2.7.4
Quoted 7 lines · Hammer Hsieh
1. Fix implicit declaration of function '
wait_for_xmitr' issue.
2. Fix 'sunplus_uart_console' undeclared here issue.
3. Fix use of undeclared identifier 'sunplus_uart_console' issue.Fixes 9e8d547032("serial:sunplus-uart:Fix compile error for SP7021")Reported-by Randy Dunlap <[email protected]>
Tested-by Randy Dunlap <[email protected]>
Acked-by Randy Dunlap <[email protected]>
thanks.
Quoted 39 lines
Reported-by kernel test robot <[email protected]>Signed-off-by Hammer Hsieh <[email protected]>--- drivers/tty/serial/sunplus-uart.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)drivers/tty/serial/sunplus-uart.c +6
-2@@ -441,7 +441,7 @@ static int sunplus_verify_port(struct uart_port *port, struct serial_struct *serreturn 0 ; } -#ifdef CONFIG_SERIAL_SUNPLUS_CONSOLE +#if defined(CONFIG_SERIAL_SUNPLUS_CONSOLE ) || defined(CONFIG_CONSOLE_POLL )static void wait_for_xmitr (struct uart_port *port) {unsigned int val;@@ -562,6 +562,10 @@ static struct console sunplus_uart_console = { .index = -1, .data = &sunplus_uart_driver }; + +#define SERIAL_SUNPLUS_CONSOLE (&sunplus_uart_console) +#else +#define SERIAL_SUNPLUS_CONSOLE NULL#endif static struct uart_driver sunplus_uart_driver = {@@ -571,7 +575,7 @@ static struct uart_driver sunplus_uart_driver = { .major = TTY_MAJOR, .minor = 64, .nr = SUP_UART_NR, - .cons = &sunplus_uart_console, + .cons = SERIAL_SUNPLUS_CONSOLE, };static void sunplus_uart_disable_unprepare (void *data)
Signature · 1 line
~Randy