[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1465564043-27163-12-git-send-email-rogerq@ti.com>
Date: Fri, 10 Jun 2016 16:07:20 +0300
From: Roger Quadros <rogerq@...com>
To: <peter.chen@...escale.com>
CC: <balbi@...nel.org>, <tony@...mide.com>,
<gregkh@...uxfoundation.org>, <dan.j.williams@...el.com>,
<mathias.nyman@...ux.intel.com>, <Joao.Pinto@...opsys.com>,
<sergei.shtylyov@...entembedded.com>, <jun.li@...escale.com>,
<grygorii.strashko@...com>, <yoshihiro.shimoda.uh@...esas.com>,
<robh@...nel.org>, <nsekhar@...com>, <b-liu@...com>,
<joe@...ches.com>, <linux-usb@...r.kernel.org>,
<linux-omap@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<devicetree@...r.kernel.org>, Roger Quadros <rogerq@...com>
Subject: [PATCH v10 11/14] usb: otg: use dev_vdbg() instead of VDBG()
Now that we have a device reference in struct usb_otg
let's use dev_vdbg() for debug messages instead of VDBG().
Signed-off-by: Roger Quadros <rogerq@...com>
Acked-by: Peter Chen <peter.chen@....com>
---
drivers/usb/common/usb-otg-fsm.c | 19 +++++++------------
1 file changed, 7 insertions(+), 12 deletions(-)
diff --git a/drivers/usb/common/usb-otg-fsm.c b/drivers/usb/common/usb-otg-fsm.c
index 482d4c9..e6e58c2 100644
--- a/drivers/usb/common/usb-otg-fsm.c
+++ b/drivers/usb/common/usb-otg-fsm.c
@@ -30,13 +30,6 @@
#include <linux/usb/otg.h>
#include <linux/usb/otg-fsm.h>
-#ifdef VERBOSE
-#define VDBG(fmt, args...) pr_debug("[%s] " fmt, \
- __func__, ## args)
-#else
-#define VDBG(stuff...) do {} while (0)
-#endif
-
/* Change USB protocol when there is a protocol change */
static int otg_set_protocol(struct otg_fsm *fsm, int protocol)
{
@@ -44,8 +37,9 @@ static int otg_set_protocol(struct otg_fsm *fsm, int protocol)
int ret = 0;
if (fsm->protocol != protocol) {
- VDBG("Changing role fsm->protocol= %d; new protocol= %d\n",
- fsm->protocol, protocol);
+ dev_vdbg(otg->dev,
+ "Changing role fsm->protocol= %d; new protocol= %d\n",
+ fsm->protocol, protocol);
/* stop old protocol */
if (fsm->protocol == PROTO_HOST)
ret = otg_start_host(otg, 0);
@@ -226,7 +220,7 @@ static int otg_set_state(struct otg_fsm *fsm, enum usb_otg_state new_state)
if (otg->state == new_state)
return 0;
- VDBG("Set state: %s\n", usb_otg_state_string(new_state));
+ dev_vdbg(otg->dev, "Set state: %s\n", usb_otg_state_string(new_state));
otg_leave_state(fsm, otg->state);
switch (new_state) {
case OTG_STATE_B_IDLE:
@@ -358,7 +352,7 @@ int otg_statemachine(struct usb_otg *otg)
switch (state) {
case OTG_STATE_UNDEFINED:
- VDBG("fsm->id = %d\n", fsm->id);
+ dev_vdbg(otg->dev, "fsm->id = %d\n", fsm->id);
if (fsm->id)
otg_set_state(fsm, OTG_STATE_B_IDLE);
else
@@ -466,7 +460,8 @@ int otg_statemachine(struct usb_otg *otg)
}
mutex_unlock(&fsm->lock);
- VDBG("quit statemachine, changed = %d\n", fsm->state_changed);
+ dev_vdbg(otg->dev, "quit statemachine, changed = %d\n",
+ fsm->state_changed);
return fsm->state_changed;
}
EXPORT_SYMBOL_GPL(otg_statemachine);
--
2.7.4
Powered by blists - more mailing lists