mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-09-27 15:10:26 +09:00
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>
This commit is contained in:
parent
8bb6c1d1e0
commit
3cbcb28928
@ -544,6 +544,10 @@ int usb_kbd_deregister(int force)
|
|||||||
data = usb_kbd_dev->privptr;
|
data = usb_kbd_dev->privptr;
|
||||||
if (stdio_deregister_dev(dev, force) != 0)
|
if (stdio_deregister_dev(dev, force) != 0)
|
||||||
return 1;
|
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
|
#ifdef CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE
|
||||||
destroy_int_queue(usb_kbd_dev, data->intq);
|
destroy_int_queue(usb_kbd_dev, data->intq);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user