From: Zixun LI Date: Thu, 25 Jul 2024 15:31:56 +0000 (+0200) Subject: usb: gadget: atmel: Replace printf() and pr_err() by log_err() X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=9ec3b70b21d9f825a4dedbf609cf76ffe37deb55;p=u-boot.git usb: gadget: atmel: Replace printf() and pr_err() by log_err() To have a uniform printing function, also drop linux/printk.h as no longer used. Signed-off-by: Zixun LI Link: https://lore.kernel.org/r/20240725153204.358925-3-admin@hifiphile.com Signed-off-by: Mattijs Korpershoek --- diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c index 5f78251fdb..4641638412 100644 --- a/drivers/usb/gadget/atmel_usba_udc.c +++ b/drivers/usb/gadget/atmel_usba_udc.c @@ -7,13 +7,13 @@ * Bo Shen */ +#include #include #include #include #include #include #include -#include #include #include #include @@ -1204,12 +1204,12 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver) int ret; if (!driver || !driver->bind || !driver->setup) { - printf("bad paramter\n"); + log_err("bad paramter\n"); return -EINVAL; } if (udc->driver) { - printf("UDC already has a gadget driver\n"); + log_err("UDC already has a gadget driver\n"); return -EBUSY; } @@ -1219,7 +1219,7 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver) ret = driver->bind(&udc->gadget); if (ret) { - pr_err("driver->bind() returned %d\n", ret); + log_err("driver->bind() returned %d\n", ret); udc->driver = NULL; } @@ -1231,7 +1231,7 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver) struct usba_udc *udc = &controller; if (!driver || !driver->unbind || !driver->disconnect) { - pr_err("bad paramter\n"); + log_err("bad paramter\n"); return -EINVAL; } @@ -1252,7 +1252,7 @@ static struct usba_ep *usba_udc_pdata(struct usba_platform_data *pdata, eps = malloc(sizeof(struct usba_ep) * pdata->num_ep); if (!eps) { - pr_err("failed to alloc eps\n"); + log_err("failed to alloc eps\n"); return NULL; }