mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-17 22:49:02 +00:00
usb: kbd: allow probing even if usbkbd not in stdin
For now the driver does not probe if usbkbd was not present in stdin. This presents two issues, we can not probe the driver before setting stdin and we can not use this driver in other manner than stdin console. This patch fixes this by adding an else statement. It simply probes the driver without console management in the case "usbkbd" is not in stdin. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
This commit is contained in:
parent
018cdfc3d0
commit
98ac7857f9
1 changed files with 13 additions and 12 deletions
|
@ -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;
|
||||
if (!strcmp(stdinname, DEVNAME)) {
|
||||
/* Reassign the console */
|
||||
if (overwrite_console())
|
||||
return 1;
|
||||
|
||||
/* 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;
|
||||
|
|
Loading…
Add table
Reference in a new issue