diff options
-rw-r--r-- | drivers/usb/host/usb-uclass.c | 2 | ||||
-rw-r--r-- | include/usb.h | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/drivers/usb/host/usb-uclass.c b/drivers/usb/host/usb-uclass.c index 02c0138a206..7a03435ba77 100644 --- a/drivers/usb/host/usb-uclass.c +++ b/drivers/usb/host/usb-uclass.c @@ -346,7 +346,7 @@ int usb_init(void) if (controllers_initialized == 0) printf("No working controllers found\n"); - return usb_started ? 0 : -1; + return usb_started ? 0 : -ENOENT; } int usb_setup_ehci_gadget(struct ehci_ctrl **ctlrp) diff --git a/include/usb.h b/include/usb.h index 42b001c3dd5..09e3f0cb309 100644 --- a/include/usb.h +++ b/include/usb.h @@ -257,7 +257,14 @@ int usb_kbd_deregister(int force); #endif /* routines */ -int usb_init(void); /* initialize the USB Controller */ + +/* + * usb_init() - initialize the USB Controllers + * + * Returns: 0 if OK, -ENOENT if there are no USB devices + */ +int usb_init(void); + int usb_stop(void); /* stop the USB Controller */ int usb_detect_change(void); /* detect if a USB device has been (un)plugged */ |