spl: input: Allow input in SPL and TPL
In some cases it is necessary to read the keyboard in early phases of
U-Boot. Update the config to allow this.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/drivers/input/input.c b/drivers/input/input.c
index 29620a9..4f514db 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -652,7 +652,7 @@
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 */
@@ -660,6 +660,9 @@
console_assign(stdin, dev->name))
return -1;
}
+#else
+ error = error;
+#endif
return 0;
}