serial: earlycon: Only try fdt when specify 'earlycon' exactly
authorJeffy Chen <jeffy.chen@rock-chips.com>
Sat, 19 Aug 2017 01:43:17 +0000 (09:43 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Aug 2017 18:51:21 +0000 (20:51 +0200)
When moving earlycon early_param handling to serial, the devicetree
earlycons enable condition changed slightly.

We used to only do that for 'console'/'earlycon', but now would also
for 'console='/'earlycon='.

Fix it by using the same condition like before.

Fixes: d503187b6cc4 (of/serial: move earlycon early_param handling to serial)
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/earlycon.c

index c3651540e1ba1aefd89c2772b0ab849a939d8c13..335933e1822ce69285612e3380d885ef961e457a 100644 (file)
@@ -220,7 +220,7 @@ static int __init param_setup_earlycon(char *buf)
                if (IS_ENABLED(CONFIG_ACPI_SPCR_TABLE)) {
                        earlycon_init_is_deferred = true;
                        return 0;
-               } else {
+               } else if (!buf) {
                        return early_init_dt_scan_chosen_stdout();
                }
        }