summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Palatin <vpalatin@chromium.org>2012-01-13 15:17:01 -0800
committerVincent Palatin <vpalatin@chromium.org>2012-01-13 18:33:06 -0800
commit4d92b575bb795fb4e48e3b6768e5e627f86eda3f (patch)
tree97cc57669b922859228994ab42072eb19edf619d
parent5efb9011d360f0796bd80944de15d2a6e4391762 (diff)
usb: properly re-initialize the USB keyboard.
Allow to reconfigure properly the USB keyboard driver when we enumerate several times the USB devices and its position in the device tree has changes. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=chrome-os-partner:7188 chrome-os-partner:7430 chrome-os-partner:7432 chrome-os-partner:7559 TEST=On lumpy with usb keyboard configured, run in recovery mode, insert a bad key, press tab, remove the key, press tab. The recovery info are displayed properly. Change-Id: I5a4c0f5a85e6946a51bc5d0f1ad0860979e84113 Reviewed-on: https://gerrit.chromium.org/gerrit/14189 Commit-Ready: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
-rw-r--r--common/usb_kbd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/usb_kbd.c b/common/usb_kbd.c
index d73a5d132b1..04832b32279 100644
--- a/common/usb_kbd.c
+++ b/common/usb_kbd.c
@@ -472,9 +472,9 @@ int drv_usb_kbd_init(void)
USB_KBD_PRINTF("USB KBD: found set up device.\n");
old_dev = stdio_get_by_name(DEVNAME);
if (old_dev) {
- /* Already registered, just return ok. */
+ /* Already registered, remove the old one */
USB_KBD_PRINTF("USB KBD: is already registered.\n");
- return 1;
+ usb_kbd_deregister();
}
/* Register the keyboard */