summaryrefslogtreecommitdiff
path: root/include/usb.h
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2015-05-05 11:54:31 +0200
committerSimon Glass <sjg@chromium.org>2015-05-05 20:58:41 -0600
commitf78a5c0774da9ca1702df453f974f022580552f4 (patch)
treec654b04dbbe16a3b653db1a7f8c00fa84500f5d7 /include/usb.h
parent134692af138243fca1037fc737651281701a9ab3 (diff)
downloadu-boot-imx-f78a5c0774da9ca1702df453f974f022580552f4.zip
u-boot-imx-f78a5c0774da9ca1702df453f974f022580552f4.tar.gz
u-boot-imx-f78a5c0774da9ca1702df453f974f022580552f4.tar.bz2
dm: usb: Make usb_get_bus easier to use for callers
Make usb_get_bus easier to use for callers, by directly returning the bus rather then returning it via a pass-by-ref argument. This also removes the error checking from the current callers, as we already have an assert() for bus not being NULL in usb_get_bus(). Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/usb.h')
-rw-r--r--include/usb.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/include/usb.h b/include/usb.h
index 1984e8f..6207d36 100644
--- a/include/usb.h
+++ b/include/usb.h
@@ -742,11 +742,10 @@ int usb_scan_device(struct udevice *parent, int port,
* will be a device with uclass UCLASS_USB.
*
* @dev: Device to check
- * @busp: Returns bus, or NULL if not found
- * @return 0 if OK, -EXDEV is somehow this bus does not have a controller (this
- * indicates a critical error in the USB stack
+ * @return The bus, or NULL if not found (this indicates a critical error in
+ * the USB stack
*/
-int usb_get_bus(struct udevice *dev, struct udevice **busp);
+struct udevice *usb_get_bus(struct udevice *dev);
/**
* usb_select_config() - Set up a device ready for use