diff options
author | Tom Rini <trini@konsulko.com> | 2022-07-14 11:10:49 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-07-14 11:10:49 -0400 |
commit | 54f683dbfb8b0777ee4d0ba00872da33e54c98fa (patch) | |
tree | 2bf9b2cb071abd2a9a80a252fc0126f1df46cfec /common/usb_kbd.c | |
parent | 58f3dc5c4eac9c6050edda6af2e37d20a2f9586d (diff) | |
parent | 16aabfe2f29d4682b2176095029fa307caccaced (diff) |
Merge https://source.denx.de/u-boot/custodians/u-boot-usb
Diffstat (limited to 'common/usb_kbd.c')
-rw-r--r-- | common/usb_kbd.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/common/usb_kbd.c b/common/usb_kbd.c index 352d86fb2e..d385bea532 100644 --- a/common/usb_kbd.c +++ b/common/usb_kbd.c @@ -581,21 +581,22 @@ static int probe_usb_keyboard(struct usb_device *dev) stdinname = env_get("stdin"); #if CONFIG_IS_ENABLED(CONSOLE_MUX) - error = iomux_doenv(stdin, stdinname); - if (error) - return error; + if (strstr(stdinname, DEVNAME) != NULL) { + error = iomux_doenv(stdin, stdinname); + if (error) + return error; + } #else /* Check if this is the standard input device. */ - if (strcmp(stdinname, DEVNAME)) - return 1; - - /* Reassign the console */ - if (overwrite_console()) - return 1; + if (!strcmp(stdinname, DEVNAME)) { + /* Reassign the console */ + if (overwrite_console()) + return 1; - error = console_assign(stdin, DEVNAME); - if (error) - return error; + error = console_assign(stdin, DEVNAME); + if (error) + return error; + } #endif return 0; |