linux/drivers/tty
Daniel Mack 1028b76960 serial: tty: uartlite: fix console setup
[ Upstream commit d157fca711ad42e75efef3444c83d2e1a17be27a ]

Remove the hack to assign the global console_port variable at probe time.
This assumption that cons->index is -1 is wrong for systems that specify
'console=' in the cmdline (or 'stdout-path' in dts). Hence, on such system
the actual console assignment is ignored, and the first UART that happens
to be probed is used as console instead.

Move the logic to console_setup() and map the console to the correct port
through the array of available ports instead.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Link: https://lore.kernel.org/r/20210528133321.1859346-1-daniel@zonque.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-07-20 16:10:43 +02:00
..
hvc tty: hvcs: Don't NULL tty->driver_data until hvcs_cleanup() 2020-10-29 09:57:38 +01:00
ipwireless tty: ipwireless: fix error handling 2020-10-29 09:58:08 +01:00
serdev serdev: ttyport: restore client ops on deregistration 2020-02-28 17:22:19 +01:00
serial serial: tty: uartlite: fix console setup 2021-07-20 16:10:43 +02:00
vt tty: vt: always invoke vc->vc_sw->con_resize callback 2021-05-26 12:05:20 +02:00
Kconfig
Makefile
amiserial.c tty: amiserial: fix TIOCSSERIAL permission check 2021-05-14 09:44:10 +02:00
cyclades.c
ehv_bytechan.c tty: evh_bytechan: Fix out of bounds accesses 2020-04-23 10:36:44 +02:00
goldfish.c
isicom.c
mips_ejtag_fdc.c
moxa.c tty: moxa: fix TIOCSSERIAL permission check 2021-05-14 09:44:11 +02:00
moxa.h
mxser.c
mxser.h
n_gsm.c tty: n_gsm: check error while registering tty devices 2021-05-11 14:04:07 +02:00
n_hdlc.c
n_null.c
n_r3964.c
n_tracerouter.c
n_tracesink.c
n_tracesink.h
n_tty.c
nozomi.c tty: nozomi: Fix the error handling path of 'nozomi_card_init()' 2021-07-14 16:53:41 +02:00
pty.c pty: do tty_flip_buffer_push without port->lock in pty_write 2020-10-29 09:57:38 +01:00
rocket.c tty: rocket, avoid OOB access 2020-04-29 16:33:17 +02:00
rocket.h
rocket_int.h
synclink.c
synclink_gt.c
synclinkmp.c
sysrq.c
tty_audit.c
tty_baudrate.c
tty_buffer.c
tty_io.c tty: fix return value for unsupported ioctls 2021-05-14 09:44:22 +02:00
tty_ioctl.c
tty_jobctrl.c tty: Fix ->session locking 2020-12-11 13:23:28 +01:00
tty_ldisc.c
tty_ldsem.c
tty_mutex.c
tty_port.c serdev: ttyport: restore client ops on deregistration 2020-02-28 17:22:19 +01:00
ttynull.c
vcc.c sparc64: vcc: Fix error return code in vcc_probe() 2020-10-01 13:17:57 +02:00