.. | .. |
---|
40 | 40 | #include <asm/prom.h> |
---|
41 | 41 | #include <asm/setup.h> |
---|
42 | 42 | |
---|
43 | | -#if defined(CONFIG_SERIAL_SUNSAB_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) |
---|
44 | | -#define SUPPORT_SYSRQ |
---|
45 | | -#endif |
---|
46 | | - |
---|
47 | 43 | #include <linux/serial_core.h> |
---|
48 | 44 | #include <linux/sunserialcore.h> |
---|
49 | 45 | |
---|
.. | .. |
---|
890 | 886 | * though... |
---|
891 | 887 | */ |
---|
892 | 888 | if (up->port.type != PORT_SUNSAB) |
---|
893 | | - return -1; |
---|
| 889 | + return -EINVAL; |
---|
894 | 890 | |
---|
895 | 891 | printk("Console: ttyS%d (SAB82532)\n", |
---|
896 | 892 | (sunsab_reg.minor - 64) + con->index); |
---|
.. | .. |
---|
985 | 981 | |
---|
986 | 982 | up->port.fifosize = SAB82532_XMIT_FIFO_SIZE; |
---|
987 | 983 | up->port.iotype = UPIO_MEM; |
---|
| 984 | + up->port.has_sysrq = IS_ENABLED(CONFIG_SERIAL_SUNSAB_CONSOLE); |
---|
988 | 985 | |
---|
989 | 986 | writeb(SAB82532_IPC_IC_ACT_LOW, &up->regs->w.ipc); |
---|
990 | 987 | |
---|
.. | .. |
---|
1140 | 1137 | } |
---|
1141 | 1138 | } |
---|
1142 | 1139 | |
---|
1143 | | - return platform_driver_register(&sab_driver); |
---|
| 1140 | + err = platform_driver_register(&sab_driver); |
---|
| 1141 | + if (err) { |
---|
| 1142 | + kfree(sunsab_ports); |
---|
| 1143 | + sunsab_ports = NULL; |
---|
| 1144 | + } |
---|
| 1145 | + |
---|
| 1146 | + return err; |
---|
1144 | 1147 | } |
---|
1145 | 1148 | |
---|
1146 | 1149 | static void __exit sunsab_exit(void) |
---|