Browse Source

USB: reevaluate iomux stdin on USB kbd detect

If CONSOLE_MUX is enabled, reevaluate console stdin when USB keyboard
device is detected.

Signed-off-by: Allen Martin <amartin@nvidia.com>
amartin@nvidia.com 13 years ago
parent
commit
fb3ef649ed
1 changed files with 6 additions and 0 deletions
  1. 6 0
      common/usb_kbd.c

+ 6 - 0
common/usb_kbd.c

@@ -487,6 +487,11 @@ int drv_usb_kbd_init(void)
 		if (error)
 		if (error)
 			return error;
 			return error;
 
 
+#ifdef CONFIG_CONSOLE_MUX
+		error = iomux_doenv(stdin, stdinname);
+		if (error)
+			return error;
+#else
 		/* Check if this is the standard input device. */
 		/* Check if this is the standard input device. */
 		if (strcmp(stdinname, DEVNAME))
 		if (strcmp(stdinname, DEVNAME))
 			return 1;
 			return 1;
@@ -498,6 +503,7 @@ int drv_usb_kbd_init(void)
 		error = console_assign(stdin, DEVNAME);
 		error = console_assign(stdin, DEVNAME);
 		if (error)
 		if (error)
 			return error;
 			return error;
+#endif
 
 
 		return 1;
 		return 1;
 	}
 	}