serial: cpm_uart: Fix build error without CONFIG_SERIAL_CPM_CONSOLE
authorYueHaibing <yuehaibing@huawei.com>
Wed, 18 May 2022 13:54:52 +0000 (21:54 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jun 2022 16:36:08 +0000 (18:36 +0200)
commit899938f18093e9b8269c48b168d3e3024effa63a
treebeca8089a937837b102b56fc39cc9a53dd26fb7d
parent8303f34e733f83661eece778aef35fb986117c52
serial: cpm_uart: Fix build error without CONFIG_SERIAL_CPM_CONSOLE

[ Upstream commit 0258502f11a4f6036b5f8b34b09027c8a92def3a ]

drivers/tty/serial/cpm_uart/cpm_uart_core.c: In function ‘cpm_uart_init_port’:
drivers/tty/serial/cpm_uart/cpm_uart_core.c:1251:7: error: ‘udbg_port’ undeclared (first use in this function); did you mean ‘uart_port’?
  if (!udbg_port)
       ^~~~~~~~~
       uart_port

commit d142585bceb3 leave this corner, wrap it with #ifdef block

Fixes: d142585bceb3 ("serial: cpm_uart: Protect udbg definitions by CONFIG_SERIAL_CPM_CONSOLE")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20220518135452.39480-1-yuehaibing@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/tty/serial/cpm_uart/cpm_uart_core.c