sunxi: musb: Improve output during probing

When we return an error the usb core will print an error-message, so in this
case do not print anything.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
This commit is contained in:
Hans de Goede 2015-06-18 22:45:34 +02:00
parent 91183babea
commit 56a2085410
1 changed files with 6 additions and 5 deletions

View File

@ -301,21 +301,22 @@ int musb_usb_probe(struct udevice *dev)
{ {
struct musb_host_data *host = dev_get_priv(dev); struct musb_host_data *host = dev_get_priv(dev);
struct usb_bus_priv *priv = dev_get_uclass_priv(dev); struct usb_bus_priv *priv = dev_get_uclass_priv(dev);
int ret;
priv->desc_before_addr = true; priv->desc_before_addr = true;
if (!host->host) { if (!host->host) {
host->host = musb_init_controller(&musb_plat, NULL, host->host = musb_init_controller(&musb_plat, NULL,
(void *)SUNXI_USB0_BASE); (void *)SUNXI_USB0_BASE);
if (!host->host) { if (!host->host)
printf("Failed to init the controller\n");
return -EIO; return -EIO;
}
} }
printf("MUSB OTG in host-mode\n"); ret = musb_lowlevel_init(host);
if (ret == 0)
printf("MUSB OTG\n");
return musb_lowlevel_init(host); return ret;
} }
int musb_usb_remove(struct udevice *dev) int musb_usb_remove(struct udevice *dev)