瀏覽代碼

of: earlycon: of_setup_earlycon() requires CONFIG_OF_EARLY_FLATTREE

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>
Peter Hurley 9 年之前
父節點
當前提交
8477614d9f
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      drivers/tty/serial/earlycon.c

+ 4 - 0
drivers/tty/serial/earlycon.c

@@ -204,6 +204,8 @@ static int __init param_setup_earlycon(char *buf)
 }
 }
 early_param("earlycon", param_setup_earlycon);
 early_param("earlycon", param_setup_earlycon);
 
 
+#ifdef CONFIG_OF_EARLY_FLATTREE
+
 int __init of_setup_earlycon(unsigned long addr,
 int __init of_setup_earlycon(unsigned long addr,
 			     int (*setup)(struct earlycon_device *, const char *))
 			     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);
 	register_console(early_console_dev.con);
 	return 0;
 	return 0;
 }
 }
+
+#endif /* CONFIG_OF_EARLY_FLATTREE */