mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
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>
This commit is contained in:
committed by
Simon Glass
parent
134692af13
commit
f78a5c0774
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user