diff options
author | Tom Rini <trini@konsulko.com> | 2023-10-11 11:53:58 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-10-11 13:22:32 -0400 |
commit | 9598cf43f946fdbc8448db218965c00d64ce3d5e (patch) | |
tree | 00230631fe97ec3effede778cc229d762c6e8778 /drivers/input/input.c | |
parent | 5ae883c7160cf8b0604ec6d03798dd90fc81ee38 (diff) | |
parent | 1a1d48e36a1b185884e82d72457f7a274e4d1857 (diff) |
Merge branch '2023-10-11-assorted-fixes-and-updates'
- Assorted TI K3 updates, use ".dtso" for device tree overlays to match
general usage, mkimage fixes/improvements, assorted platform
updates/fixes, other assorted driver/platform fixes.
Diffstat (limited to 'drivers/input/input.c')
-rw-r--r-- | drivers/input/input.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/drivers/input/input.c b/drivers/input/input.c index a4341e8c7c..8a6506e7c6 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c @@ -669,17 +669,22 @@ int input_stdio_register(struct stdio_dev *dev) int error; error = stdio_register(dev); -#if !defined(CONFIG_SPL_BUILD) || CONFIG_IS_ENABLED(ENV_SUPPORT) - /* check if this is the standard input device */ - if (!error && strcmp(env_get("stdin"), dev->name) == 0) { - /* reassign the console */ - if (OVERWRITE_CONSOLE || - console_assign(stdin, dev->name)) - return -1; + + if (!CONFIG_IS_ENABLED(ENV_SUPPORT)) + return 0; + + if (!error) { + const char *cstdin; + + /* check if this is the standard input device */ + cstdin = env_get("stdin"); + if (cstdin && !strcmp(cstdin, dev->name)) { + /* reassign the console */ + if (OVERWRITE_CONSOLE || + console_assign(stdin, dev->name)) + return -1; + } } -#else - error = error; -#endif return 0; } |