of: earlycon: of_setup_earlycon() requires CONFIG_OF_EARLY_FLATTREE
authorPeter Hurley <peter@hurleysoftware.com>
Sat, 16 Jan 2016 23:23:38 +0000 (15:23 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 7 Feb 2016 06:07:37 +0000 (22:07 -0800)
DT earlycon is only supported for CONFIG_OF_EARLY_FLATTREE=y; exclude
of_setup_earlycon() if not defined.

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

index 3f2423690d01c155338d3e273ac0801b273ca5a8..54419a210dc3f02d7016f7caf07bdaac87c7d6d4 100644 (file)
@@ -204,6 +204,8 @@ static int __init param_setup_earlycon(char *buf)
 }
 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 *))
 {
@@ -227,3 +229,5 @@ int __init of_setup_earlycon(unsigned long addr,
        register_console(early_console_dev.con);
        return 0;
 }
+
+#endif /* CONFIG_OF_EARLY_FLATTREE */