Skip to contentSkip to conversation

usb: chipidea: Use dev_err() instead of pr_err()

PATCH New Fabio Estevam 1 participant 1 message Jun 5, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 usb: chipidea: Use dev_err() instead of pr_err()

dev_err() is more appropriate for printing error messages inside drivers, so switch to dev_err().

While at it also add the missing newlines.

---
Changes since v2:
- Keep the orginal string

 drivers/usb/chipidea/core.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/usb/chipidea/core.c +3 -2
index 27749ace2d93..1b6495829265 100644
@@ -523,8 +523,9 @@ int hw_device_reset(struct ci_hdrc *ci)
 	hw_write(ci, OP_USBMODE, USBMODE_SLOM, USBMODE_SLOM);
 
 	if (hw_read(ci, OP_USBMODE, USBMODE_CM) != USBMODE_CM_DC) {
-		pr_err("cannot enter in %s device mode", ci_role(ci)->name);
-		pr_err("lpm = %i", ci->hw_bank.lpm);
+		dev_err(ci->dev, "cannot enter in %s device mode\n",
+			ci_role(ci)->name);
+		dev_err(ci->dev, "lpm = %i\n", ci->hw_bank.lpm);
 		return -ENODEV;
 	}
 
Signature · 1 line
2.17.1