[PATCH v2 2/2] drivers: usb: musb: ti: Use dev_err instead of pr_err

Arnaud Ferraris arnaud.ferraris at collabora.com
Wed May 6 12:39:40 CEST 2020


In order to maintain consistency, every call to pr_err() is replaced
with dev_err().

Signed-off-by: Arnaud Ferraris <arnaud.ferraris at collabora.com>
---

Changes in v2:
- added in v2

 drivers/usb/musb-new/ti-musb.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/usb/musb-new/ti-musb.c b/drivers/usb/musb-new/ti-musb.c
index 56d6134dc6..f8cb488cc4 100644
--- a/drivers/usb/musb-new/ti-musb.c
+++ b/drivers/usb/musb-new/ti-musb.c
@@ -114,7 +114,7 @@ static int ti_musb_ofdata_to_platdata(struct udevice *dev)
 	musb_config->multipoint = fdtdec_get_int(fdt, node,
 						 "mentor,multipoint", -1);
 	if (musb_config->multipoint < 0) {
-		pr_err("MUSB multipoint DT entry missing\n");
+		dev_err(dev, "MUSB multipoint DT entry missing\n");
 		return -ENOENT;
 	}
 
@@ -123,14 +123,14 @@ static int ti_musb_ofdata_to_platdata(struct udevice *dev)
 	musb_config->num_eps = fdtdec_get_int(fdt, node, "mentor,num-eps",
 					      -1);
 	if (musb_config->num_eps < 0) {
-		pr_err("MUSB num-eps DT entry missing\n");
+		dev_err(dev, "MUSB num-eps DT entry missing\n");
 		return -ENOENT;
 	}
 
 	musb_config->ram_bits = fdtdec_get_int(fdt, node, "mentor,ram-bits",
 					       -1);
 	if (musb_config->ram_bits < 0) {
-		pr_err("MUSB ram-bits DT entry missing\n");
+		dev_err(dev, "MUSB ram-bits DT entry missing\n");
 		return -ENOENT;
 	}
 
@@ -138,7 +138,7 @@ static int ti_musb_ofdata_to_platdata(struct udevice *dev)
 
 	platdata->plat.power = fdtdec_get_int(fdt, node, "mentor,power", -1);
 	if (platdata->plat.power < 0) {
-		pr_err("MUSB mentor,power DT entry missing\n");
+		dev_err(dev, "MUSB mentor,power DT entry missing\n");
 		return -ENOENT;
 	}
 
@@ -189,7 +189,7 @@ static int ti_musb_host_ofdata_to_platdata(struct udevice *dev)
 
 	ret = ti_musb_ofdata_to_platdata(dev);
 	if (ret) {
-		pr_err("platdata dt parse error\n");
+		dev_err(dev, "platdata dt parse error\n");
 		return ret;
 	}
 
@@ -227,7 +227,7 @@ static int ti_musb_peripheral_ofdata_to_platdata(struct udevice *dev)
 
 	ret = ti_musb_ofdata_to_platdata(dev);
 	if (ret) {
-		pr_err("platdata dt parse error\n");
+		dev_err(dev, "platdata dt parse error\n");
 		return ret;
 	}
 	platdata->plat.mode = MUSB_PERIPHERAL;
@@ -312,7 +312,7 @@ static int ti_musb_wrapper_bind(struct udevice *parent)
 							 node,
 							 &dev);
 			if (ret)
-				pr_err("musb - not able to bind usb peripheral node\n");
+				dev_err(dev, "musb - not able to bind usb peripheral node\n");
 			break;
 		case USB_DR_MODE_HOST:
 			/* Bind MUSB host */
@@ -322,7 +322,7 @@ static int ti_musb_wrapper_bind(struct udevice *parent)
 							 node,
 							 &dev);
 			if (ret)
-				pr_err("musb - not able to bind usb host node\n");
+				dev_err(dev, "musb - not able to bind usb host node\n");
 			break;
 		default:
 			break;
-- 
2.26.2



More information about the U-Boot mailing list