usb: misc: Avoid excessive logging during disconnect
When the device is in the midst of being disconnected, calls to
usb_autopm_get_interface() may fail, and a ERR-level message is
printed. Callers of such I/O functions may repeatedly try calling
again, and could end up flooding the console leading to a watchdog
timeout. Replace these printks with DBG-level messages since the
device disconnection is normal and the errors they indicate are
usually benign.
CRs-fixed: 394256
Change-Id: Icf9000faa9001832734ff9c64cd903b375cc2017
Signed-off-by: Jack Pham <jackp@codeaurora.org>
diff --git a/drivers/usb/misc/mdm_data_bridge.c b/drivers/usb/misc/mdm_data_bridge.c
index 1c9de07..59ae13b 100644
--- a/drivers/usb/misc/mdm_data_bridge.c
+++ b/drivers/usb/misc/mdm_data_bridge.c
@@ -370,7 +370,7 @@
status = usb_autopm_get_interface(dev->intf);
if (status < 0) {
- dev_err(&dev->intf->dev,
+ dev_dbg(&dev->intf->dev,
"can't acquire interface, status %d\n", status);
return;
}
@@ -389,7 +389,7 @@
status = usb_autopm_get_interface(dev->intf);
if (status < 0) {
- dev_err(&dev->intf->dev,
+ dev_dbg(&dev->intf->dev,
"can't acquire interface, status %d\n", status);
return;
}
@@ -478,7 +478,7 @@
result = usb_autopm_get_interface(dev->intf);
if (result < 0) {
- dev_err(&dev->intf->dev, "%s: resume failure\n", __func__);
+ dev_dbg(&dev->intf->dev, "%s: resume failure\n", __func__);
goto pm_error;
}