hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/tty/serial/sunzilog.c
....@@ -40,10 +40,6 @@
4040 #include <asm/prom.h>
4141 #include <asm/setup.h>
4242
43
-#if defined(CONFIG_SERIAL_SUNZILOG_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
44
-#define SUPPORT_SYSRQ
45
-#endif
46
-
4743 #include <linux/serial_core.h>
4844 #include <linux/sunserialcore.h>
4945
....@@ -310,7 +306,7 @@
310306 switch (ret) {
311307 case 2:
312308 sunzilog_change_mouse_baud(up);
313
- /* fallthru */
309
+ fallthrough;
314310 case 1:
315311 break;
316312
....@@ -1225,7 +1221,7 @@
12251221 int baud, brg;
12261222
12271223 if (up->port.type != PORT_SUNZILOG)
1228
- return -1;
1224
+ return -EINVAL;
12291225
12301226 printk(KERN_INFO "Console: ttyS%d (SunZilog zs%d)\n",
12311227 (sunzilog_reg.minor - 64) + con->index, con->index);
....@@ -1444,6 +1440,7 @@
14441440 up[0].port.line = (inst * 2) + 0;
14451441 up[0].port.dev = &op->dev;
14461442 up[0].flags |= SUNZILOG_FLAG_IS_CHANNEL_A;
1443
+ up[0].port.has_sysrq = IS_ENABLED(CONFIG_SERIAL_SUNZILOG_CONSOLE);
14471444 if (keyboard_mouse)
14481445 up[0].flags |= SUNZILOG_FLAG_CONS_KEYB;
14491446 sunzilog_init_hw(&up[0]);
....@@ -1461,6 +1458,7 @@
14611458 up[1].port.line = (inst * 2) + 1;
14621459 up[1].port.dev = &op->dev;
14631460 up[1].flags |= 0;
1461
+ up[1].port.has_sysrq = IS_ENABLED(CONFIG_SERIAL_SUNZILOG_CONSOLE);
14641462 if (keyboard_mouse)
14651463 up[1].flags |= SUNZILOG_FLAG_CONS_MOUSE;
14661464 sunzilog_init_hw(&up[1]);