linux/drivers/tty/serial/cpm_uart
Geert Uytterhoeven d142585bce serial: cpm_uart: Protect udbg definitions by CONFIG_SERIAL_CPM_CONSOLE
If CONFIG_CONSOLE_POLL=y, and CONFIG_SERIAL_CPM=m (hence
CONFIG_SERIAL_CPM_CONSOLE=n):

    drivers/tty/serial/cpm_uart/cpm_uart_core.c:1109:12: warning: ‘udbg_cpm_getc’ defined but not used [-Wunused-function]
     1109 | static int udbg_cpm_getc(void)
	  |            ^~~~~~~~~~~~~
    drivers/tty/serial/cpm_uart/cpm_uart_core.c:1095:13: warning: ‘udbg_cpm_putc’ defined but not used [-Wunused-function]
     1095 | static void udbg_cpm_putc(char c)
	  |             ^~~~~~~~~~~~~

Fix this by making the udbg definitions depend on
CONFIG_SERIAL_CPM_CONSOLE, in addition to CONFIG_CONSOLE_POLL.

Fixes: a60526097f ("tty: serial: cpm_uart: Add udbg support for enabling xmon")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Link: https://lore.kernel.org/r/20211027075326.3270785-1-geert@linux-m68k.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-10-30 11:01:48 +02:00
..
cpm_uart_core.c serial: cpm_uart: Protect udbg definitions by CONFIG_SERIAL_CPM_CONSOLE 2021-10-30 11:01:48 +02:00
cpm_uart_cpm1.c mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
cpm_uart_cpm1.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cpm_uart_cpm2.c mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
cpm_uart_cpm2.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cpm_uart.h tty: serial: Use the correct style for SPDX License Identifier 2020-03-07 09:52:01 +01:00
Makefile tty: add SPDX identifiers to Kconfig and Makefiles 2019-04-04 18:48:43 +02:00