summaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/8250/8250_core.c
diff options
context:
space:
mode:
authorDmitry Safonov <dima@arista.com>2019-12-13 00:06:04 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-12-18 15:04:42 +0100
commitd68fefdd5b5f107403568c8a4650e858132bd83a (patch)
treeae225c6292d02b101b23d5aaf780a0611670bd3c /drivers/tty/serial/8250/8250_core.c
parentc3a4e5527351c73b665596d4dd27ce482e93f50c (diff)
downloadlinux-stable-d68fefdd5b5f107403568c8a4650e858132bd83a.tar.gz
linux-stable-d68fefdd5b5f107403568c8a4650e858132bd83a.tar.bz2
linux-stable-d68fefdd5b5f107403568c8a4650e858132bd83a.zip
tty/serial: Migrate 8250_fsl to use has_sysrq
The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. In contrast to 8250/8250_of, legacy_serial on powerpc does fill (struct plat_serial8250_port). The reason is likely that it's done on device_initcall(), not on probe. So, 8250_core is not yet probed. Propagate value from platform_device on 8250 probe - in case powepc legacy driver it's initialized on initcall, in case 8250_of it will be initialized later on of_platform_serial_setup(). Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Dmitry Safonov <dima@arista.com> Link: https://lore.kernel.org/r/20191213000657.931618-6-dima@arista.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/8250/8250_core.c')
-rw-r--r--drivers/tty/serial/8250/8250_core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
index e682390ce0de..0894a22fd702 100644
--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
@@ -816,6 +816,7 @@ static int serial8250_probe(struct platform_device *dev)
uart.port.flags = p->flags;
uart.port.mapbase = p->mapbase;
uart.port.hub6 = p->hub6;
+ uart.port.has_sysrq = p->has_sysrq;
uart.port.private_data = p->private_data;
uart.port.type = p->type;
uart.port.serial_in = p->serial_in;