diff options
author | Simon Glass <sjg@chromium.org> | 2023-07-30 20:15:12 +0300 |
---|---|---|
committer | Bin Meng <bmeng.cn@gmail.com> | 2023-08-09 18:31:11 +0300 |
commit | 4c4ccc5a0499cf2abdca95415caf7443c760a26d (patch) | |
tree | 743d4ea57c5e865d48b3fb0ccd2be6afe5510bdd /include/usb.h | |
parent | ef8336e2705fce2502383f25d68188c6b1f94dd0 (diff) | |
download | u-boot-4c4ccc5a0499cf2abdca95415caf7443c760a26d.tar.xz |
usb: Return -ENOENT when no devices are found
When USB finds no devices it currently returns -EPERM which bootstd does
not understand. This causes other bootdevs of the same priority to be
skipped.
Fix this by returning the correct error code.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'include/usb.h')
-rw-r--r-- | include/usb.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/usb.h b/include/usb.h index 42b001c3dd..09e3f0cb30 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 */ |