forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-02-19 1c055e55a242a33e574e48be530e06770a210dcd
kernel/drivers/tty/serial/sunsu.c
....@@ -44,10 +44,6 @@
4444 #include <asm/prom.h>
4545 #include <asm/setup.h>
4646
47
-#if defined(CONFIG_SERIAL_SUNSU_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
48
-#define SUPPORT_SYSRQ
49
-#endif
50
-
5147 #include <linux/serial_core.h>
5248 #include <linux/sunserialcore.h>
5349
....@@ -518,7 +514,7 @@
518514 switch (ret) {
519515 case 2:
520516 sunsu_change_mouse_baud(up);
521
- /* fallthru */
517
+ fallthrough;
522518 case 1:
523519 break;
524520
....@@ -1475,6 +1471,7 @@
14751471
14761472 up->port.type = PORT_UNKNOWN;
14771473 up->port.uartclk = (SU_BASE_BAUD * 16);
1474
+ up->port.has_sysrq = IS_ENABLED(CONFIG_SERIAL_SUNSU_CONSOLE);
14781475
14791476 err = 0;
14801477 if (up->su_type == SU_PORT_KBD || up->su_type == SU_PORT_MS) {
....@@ -1503,8 +1500,8 @@
15031500 up->port.ops = &sunsu_pops;
15041501
15051502 ignore_line = false;
1506
- if (!strcmp(dp->name, "rsc-console") ||
1507
- !strcmp(dp->name, "lom-console"))
1503
+ if (of_node_name_eq(dp, "rsc-console") ||
1504
+ of_node_name_eq(dp, "lom-console"))
15081505 ignore_line = true;
15091506
15101507 sunserial_console_match(SUNSU_CONSOLE(), dp,