diff options
author | Hans de Goede <hdegoede@redhat.com> | 2015-01-11 20:34:44 +0100 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2015-01-18 12:31:36 +0100 |
commit | 3cbcb2892809b59d59bf62cb8e49705227ee382a (patch) | |
tree | 6cbd5b6251de32efa762d33b20115188f1a986c3 /common | |
parent | 8bb6c1d1e0ac3692df1b83eaeee42541c09e09fc (diff) | |
download | u-boot-3cbcb2892809b59d59bf62cb8e49705227ee382a.zip u-boot-3cbcb2892809b59d59bf62cb8e49705227ee382a.tar.gz u-boot-3cbcb2892809b59d59bf62cb8e49705227ee382a.tar.bz2 |
usb: Fix usb_kbd_deregister when console-muxing is used
When iomuxing is used we must not only deregister the device with stdio.c,
but also remove the reference to the device in the console_devices array
used by console-muxing. Add a call to iomux_doenv to usb_kbd_deregister to
update console_devices, which will drop the reference.
This fixes the console filling with "Failed to enqueue URB to controller"
messages after a "usb stop force", or when the USB keyboard is gone after a
"usb reset".
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'common')
-rw-r--r-- | common/usb_kbd.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/common/usb_kbd.c b/common/usb_kbd.c index 0d47743..ecc3085 100644 --- a/common/usb_kbd.c +++ b/common/usb_kbd.c @@ -544,6 +544,10 @@ int usb_kbd_deregister(int force) data = usb_kbd_dev->privptr; if (stdio_deregister_dev(dev, force) != 0) return 1; +#ifdef CONFIG_CONSOLE_MUX + if (iomux_doenv(stdin, getenv("stdin")) != 0) + return 1; +#endif #ifdef CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE destroy_int_queue(usb_kbd_dev, data->intq); #endif |