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: 9e8d5470325f ("serial: sunplus-uart: Add Sunplus SoC UART Driver")
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Hammer Hsieh <hammerh0314@gmail.com>
Link: https://lore.kernel.org/r/1646108386-29905-1-git-send-email-hammerh0314@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
return 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;
.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 = {
.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)