serial: ma35d1: Do not force-enable an unselected console

When another console is selected and there is no matching ttyNVT console
argument, the core accepts the MA35D1 console without calling its setup
function because it has CON_ENABLED set before registration.  Its index
remains -1 and printk repeatedly reports an invalid port, flooding the
console and preventing boot.

Let the console core enable it after successful setup.

Fixes: 930cbf92db ("tty: serial: Add Nuvoton ma35d1 serial driver support")
Assisted-by: LLM
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
Link: https://patch.msgid.link/20261012055340.16719-1-kmehltretter@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Karl Mehltretter 2026-10-12 07:53:40 +02:00 committed by Greg Kroah-Hartman
parent 8a97502095
commit 171bb8a67c

View File

@ -639,7 +639,7 @@ static struct console ma35d1serial_console = {
.write = ma35d1serial_console_write,
.device = uart_console_device,
.setup = ma35d1serial_console_setup,
.flags = CON_PRINTBUFFER | CON_ENABLED,
.flags = CON_PRINTBUFFER,
.index = -1,
.data = &ma35d1serial_reg,
};