summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/earlycon.c
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2016-01-17 02:23:41 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-07 09:07:37 +0300
commit05d961320ba624c98b16d72b32f947307674b341 (patch)
treef67a57f0a7d8152957461434cf9c4169f48374f4 /drivers/tty/serial/earlycon.c
parentcda64e68240265752c6db22a75f28707dfaf6563 (diff)
downloadlinux-05d961320ba624c98b16d72b32f947307674b341.tar.xz
of: earlycon: Fixup earlycon console name and index
Use the console name embedded in the OF earlycon table by the OF_EARLYCON_DECLARE() macro to initialize the struct console 'name' and 'index' fields. Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/earlycon.c')
-rw-r--r--drivers/tty/serial/earlycon.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/tty/serial/earlycon.c b/drivers/tty/serial/earlycon.c
index 90b064faa1c4..47e54deb944b 100644
--- a/drivers/tty/serial/earlycon.c
+++ b/drivers/tty/serial/earlycon.c
@@ -218,7 +218,7 @@ early_param("earlycon", param_setup_earlycon);
#ifdef CONFIG_OF_EARLY_FLATTREE
int __init of_setup_earlycon(unsigned long addr,
- int (*setup)(struct earlycon_device *, const char *))
+ const struct earlycon_id *match)
{
int err;
struct uart_port *port = &early_console_dev.port;
@@ -229,8 +229,8 @@ int __init of_setup_earlycon(unsigned long addr,
port->uartclk = BASE_BAUD * 16;
port->membase = earlycon_map(addr, SZ_4K);
- early_console_dev.con->data = &early_console_dev;
- err = setup(&early_console_dev, NULL);
+ earlycon_init(&early_console_dev, match->name);
+ err = match->setup(&early_console_dev, NULL);
if (err < 0)
return err;
if (!early_console_dev.con->write)