usb: properly re-initialize the USB keyboard.
authorVincent Palatin <vpalatin@chromium.org>
Sat, 11 May 2013 02:48:58 +0000 (19:48 -0700)
committerMarek Vasut <marex@denx.de>
Wed, 12 Jun 2013 20:22:50 +0000 (22:22 +0200)
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>
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
common/usb_kbd.c

index b962849920a40c5cc1aefca9f2f1c0425e114d14..188763d605525202a07ca62e181f18e2f648b8bc 100644 (file)
@@ -496,6 +496,7 @@ int drv_usb_kbd_init(void)
                if (old_dev) {
                        /* Already registered, just return ok. */
                        debug("USB KBD: is already registered.\n");
+                       usb_kbd_deregister();
                        return 1;
                }