When we return an error the usb core will log a message, so in this case do not print a newline, instead print ": " after our identifier as a seperator between our identifier and the error message logged by the core.
Signed-off-by: Hans de Goede <hdego...@redhat.com> --- drivers/usb/musb-new/sunxi.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/usb/musb-new/sunxi.c b/drivers/usb/musb-new/sunxi.c index d1cb8e0..bb88687 100644 --- a/drivers/usb/musb-new/sunxi.c +++ b/drivers/usb/musb-new/sunxi.c @@ -301,21 +301,26 @@ int musb_usb_probe(struct udevice *dev) { struct musb_host_data *host = dev_get_priv(dev); struct usb_bus_priv *priv = dev_get_uclass_priv(dev); + int ret; priv->desc_before_addr = true; + printf("MUSB OTG"); + if (!host->host) { host->host = musb_init_controller(&musb_plat, NULL, (void *)SUNXI_USB0_BASE); if (!host->host) { - printf("Failed to init the controller\n"); + printf(": "); return -EIO; } } - printf("MUSB OTG in host-mode\n"); + ret = musb_lowlevel_init(host); + + printf((ret == 0) ? "\n" : ": "); - return musb_lowlevel_init(host); + return ret; } int musb_usb_remove(struct udevice *dev) -- 2.4.3 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot