mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-18 15:19:38 +02:00
serial: 8250: Fix add preferred console for serial8250_isa_init_ports()
We need to inline serial_base_add_isa_preferred_console() based on
CONFIG_SERIAL_8250_CONSOLE and not based on CONFIG_SERIAL_CORE_CONSOLE.
Otherwise we can get the follwoing error as noted by Stephen:
ERROR: modpost: "serial_base_add_isa_preferred_console"
[drivers/tty/serial/8250/8250.ko] undefined!
We also have a duplicate inlined serial_base_add_isa_preferred_console(),
in serial_base_bus.c added by the same commit by accident, let's drop it.
Fixes: a8b04cfe7d
("serial: 8250: Add preferred console in serial8250_isa_init_ports()")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Link: https://lore.kernel.org/r/20240411080622.11929-1-tony@atomide.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
48d4a801be
commit
4547cd76f0
|
@ -51,8 +51,6 @@ void serial_core_unregister_port(struct uart_driver *drv, struct uart_port *port
|
||||||
int serial_base_add_preferred_console(struct uart_driver *drv,
|
int serial_base_add_preferred_console(struct uart_driver *drv,
|
||||||
struct uart_port *port);
|
struct uart_port *port);
|
||||||
|
|
||||||
int serial_base_add_isa_preferred_console(const char *name, int idx);
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
static inline
|
static inline
|
||||||
|
@ -62,6 +60,14 @@ int serial_base_add_preferred_console(struct uart_driver *drv,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_SERIAL_8250_CONSOLE
|
||||||
|
|
||||||
|
int serial_base_add_isa_preferred_console(const char *name, int idx);
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
static inline
|
static inline
|
||||||
int serial_base_add_isa_preferred_console(const char *name, int idx)
|
int serial_base_add_isa_preferred_console(const char *name, int idx)
|
||||||
{
|
{
|
||||||
|
|
|
@ -219,6 +219,8 @@ static int serial_base_add_one_prefcon(const char *match, const char *dev_name,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __sparc__
|
#ifdef __sparc__
|
||||||
|
|
||||||
/* Handle Sparc ttya and ttyb options as done in console_setup() */
|
/* Handle Sparc ttya and ttyb options as done in console_setup() */
|
||||||
|
@ -329,15 +331,6 @@ int serial_base_add_isa_preferred_console(const char *name, int idx)
|
||||||
return serial_base_add_prefcon(name, idx);
|
return serial_base_add_prefcon(name, idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
int serial_base_add_isa_preferred_console(const char *name, int idx)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int serial_base_init(void)
|
static int serial_base_init(void)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user