]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
serial: earlycon: Move ->uartclk initialize
authorPeter Hurley <peter@hurleysoftware.com>
Mon, 9 Mar 2015 20:27:15 +0000 (16:27 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Mar 2015 15:17:55 +0000 (16:17 +0100)
Initializing the ->uartclk field is not related to option parsing;
relocate from parse_options() to setup_earlycon() (which mirrors the
behavior of of_setup_earlycon()).

Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/earlycon.c

index 58d6bcdaf31c9c879824d30402a57987c96ea614..0480c8f24cbbd621756bac399ff821b5d03378c3 100644 (file)
@@ -76,8 +76,6 @@ static int __init parse_options(struct earlycon_device *device, char *options)
                return -EINVAL;
        }
 
-       port->uartclk = BASE_BAUD * 16;
-
        if (options) {
                device->baud = simple_strtoul(options, NULL, 0);
                length = min(strcspn(options, " ") + 1,
@@ -121,6 +119,7 @@ int __init setup_earlycon(char *buf, const char *match,
        if (!err)
                buf = NULL;
 
+       port->uartclk = BASE_BAUD * 16;
        if (port->mapbase)
                port->membase = earlycon_map(port->mapbase, 64);