Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

serial: pch_uart: fix build error with !CONFIG_DEBUG_FS

Fix the build error with CONFIG_DEBUG_FS is not set:

drivers/tty/serial/pch_uart.c: In function 'pch_uart_init_port':
drivers/tty/serial/pch_uart.c:1815:9: error: 'port_regs_ops' undeclared (first use in this function)
1815 | &port_regs_ops);
| ^~~~~~~~~~~~~

This commit get rid of the CONFIG_PM_SLEEP ifdefery to
fix the build error.

Fixes: 1f8a51ee3242 ("tty: serial: pch_uart.c: remove debugfs dentry pointer")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Link: https://lore.kernel.org/r/20210322122601.2980258-1-weiyongjun1@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Wei Yongjun and committed by
Greg Kroah-Hartman
df5d151e 1657ca6e

-3
-3
drivers/tty/serial/pch_uart.c
··· 291 291 static const int trigger_level_16[4] = { 1, 4, 8, 14 }; 292 292 static const int trigger_level_1[4] = { 1, 1, 1, 1 }; 293 293 294 - #ifdef CONFIG_DEBUG_FS 295 - 296 294 #define PCH_REGS_BUFSIZE 1024 297 295 298 296 ··· 350 352 .read = port_show_regs, 351 353 .llseek = default_llseek, 352 354 }; 353 - #endif /* CONFIG_DEBUG_FS */ 354 355 355 356 static const struct dmi_system_id pch_uart_dmi_table[] = { 356 357 {