forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/drivers/tty/serial/sunsab.c
....@@ -40,10 +40,6 @@
4040 #include <asm/prom.h>
4141 #include <asm/setup.h>
4242
43
-#if defined(CONFIG_SERIAL_SUNSAB_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
44
-#define SUPPORT_SYSRQ
45
-#endif
46
-
4743 #include <linux/serial_core.h>
4844 #include <linux/sunserialcore.h>
4945
....@@ -890,7 +886,7 @@
890886 * though...
891887 */
892888 if (up->port.type != PORT_SUNSAB)
893
- return -1;
889
+ return -EINVAL;
894890
895891 printk("Console: ttyS%d (SAB82532)\n",
896892 (sunsab_reg.minor - 64) + con->index);
....@@ -985,6 +981,7 @@
985981
986982 up->port.fifosize = SAB82532_XMIT_FIFO_SIZE;
987983 up->port.iotype = UPIO_MEM;
984
+ up->port.has_sysrq = IS_ENABLED(CONFIG_SERIAL_SUNSAB_CONSOLE);
988985
989986 writeb(SAB82532_IPC_IC_ACT_LOW, &up->regs->w.ipc);
990987