Browse Source

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 years ago
parent
commit
ac3821430e
1 changed files with 3 additions and 1 deletions
  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");