瀏覽代碼

terminal: only serial_reinit_all if available

serial_reinit_all() is only available if CONFIG_SERIAL is defined (i.e.
!CONFIG_DM_SERIAL).

Signed-off-by: Asherah Connor <ashe@kivikakk.ee>
Reviewed-by: Simon Glass <sjg@chromium.org>
Asherah Connor 3 年之前
父節點
當前提交
ac3821430e
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      cmd/terminal.c

+ 3 - 1
cmd/terminal.c

@@ -25,7 +25,9 @@ int do_terminal(struct cmd_tbl *cmd, int flag, int argc, char *const argv[])
 	if (!dev)
 		return -1;
 
-	serial_reinit_all();
+	if (IS_ENABLED(CONFIG_SERIAL))
+		serial_reinit_all();
+
 	printf("Entering terminal mode for port %s\n", dev->name);
 	puts("Use '~.' to leave the terminal and get back to u-boot\n");