[PATCH v2 1/2] usb: musb-new: sunxi: remove unwanted printfs

Sam Edwards cfsworks at gmail.com
Thu Jun 8 21:56:30 CEST 2023


Per Marek's feedback, unconditional printfs in the probe function of this
USB controller driver should be removed.

This patch also slightly tidies up the return path, in preparation for
DM support.

Signed-off-by: Sam Edwards <CFSworks at gmail.com>
Cc: Marek Vasut <marex at denx.de>
---
 drivers/usb/musb-new/sunxi.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/usb/musb-new/sunxi.c b/drivers/usb/musb-new/sunxi.c
index c1c0087f7d..510b254f7d 100644
--- a/drivers/usb/musb-new/sunxi.c
+++ b/drivers/usb/musb-new/sunxi.c
@@ -494,19 +494,15 @@ static int musb_usb_probe(struct udevice *dev)
 	if (!host->host)
 		return -EIO;
 
-	ret = musb_lowlevel_init(host);
-	if (!ret)
-		printf("Allwinner mUSB OTG (Host)\n");
+	return musb_lowlevel_init(host);
 #else
 	pdata.mode = MUSB_PERIPHERAL;
 	host->host = musb_register(&pdata, &glue->dev, base);
 	if (IS_ERR_OR_NULL(host->host))
 		return -EIO;
 
-	printf("Allwinner mUSB OTG (Peripheral)\n");
+	return 0;
 #endif
-
-	return ret;
 }
 
 static int musb_usb_remove(struct udevice *dev)
-- 
2.39.2



More information about the U-Boot mailing list