summaryrefslogtreecommitdiffstats
path: root/cmd/usb.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2016-04-03 09:18:53 +0200
committerMarek Vasut <marex@denx.de>2016-04-10 17:18:42 +0200
commit9a80e714350a959caadfd6e2405cd1f7e8ea86d3 (patch)
treea72b2511810053681941ed63be213f326f507220 /cmd/usb.c
parentcfb3f1cd0e022711d69ff040884357b8410865ef (diff)
downloadtalos-obmc-uboot-9a80e714350a959caadfd6e2405cd1f7e8ea86d3.tar.gz
talos-obmc-uboot-9a80e714350a959caadfd6e2405cd1f7e8ea86d3.zip
usb: kbd: Do not deregister usbkbd twice when using dm
The dm usb_kbd_remove function() will deregister the usb keyboard for us on a "usb reset" / "usb stop" so there is no need to manually call usb_kbd_deregister() in the dm case. This commit removes usb_kbd_deregister() in the dm case fixing the following "usb reset" errors: usb_kbd_remove: warning, ret=-6 device_remove: Device 'usb_kbd' failed to remove, but children are gone Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'cmd/usb.c')
-rw-r--r--cmd/usb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/usb.c b/cmd/usb.c
index 9ed5dc61ea..97dd6f0099 100644
--- a/cmd/usb.c
+++ b/cmd/usb.c
@@ -541,7 +541,7 @@ static int do_usbboot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
static int do_usb_stop_keyboard(int force)
{
-#ifdef CONFIG_USB_KEYBOARD
+#if !defined CONFIG_DM_USB && defined CONFIG_USB_KEYBOARD
if (usb_kbd_deregister(force) != 0) {
printf("USB not stopped: usbkbd still using USB\n");
return 1;
OpenPOWER on IntegriCloud