From patchwork Wed Jun 8 09:03:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 69594 Delivered-To: patch@linaro.org Received: by 10.140.106.246 with SMTP id e109csp2383558qgf; Wed, 8 Jun 2016 02:05:27 -0700 (PDT) X-Received: by 10.66.25.8 with SMTP id y8mr4641581paf.106.1465376722591; Wed, 08 Jun 2016 02:05:22 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m8si310457pfa.242.2016.06.08.02.05.18; Wed, 08 Jun 2016 02:05:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161903AbcFHJFK (ORCPT + 31 others); Wed, 8 Jun 2016 05:05:10 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:58566 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161771AbcFHJFD (ORCPT ); Wed, 8 Jun 2016 05:05:03 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id u5894c43004517; Wed, 8 Jun 2016 04:04:38 -0500 Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id u5894qiR028972; Wed, 8 Jun 2016 04:04:52 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.294.0; Wed, 8 Jun 2016 04:04:51 -0500 Received: from lta0400828d.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id u5893q5Z001659; Wed, 8 Jun 2016 04:04:46 -0500 From: Roger Quadros To: CC: , , , , , , , , , , , , , , , , , Roger Quadros Subject: [PATCH v9 11/14] usb: otg: use dev_dbg() instead of VDBG() Date: Wed, 8 Jun 2016 12:03:43 +0300 Message-ID: <1465376626-30122-12-git-send-email-rogerq@ti.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1465376626-30122-1-git-send-email-rogerq@ti.com> References: <1465376626-30122-1-git-send-email-rogerq@ti.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now that we have a device reference in struct usb_otg let's use dev_dbg() for debug messages. Signed-off-by: Roger Quadros Acked-by: Peter Chen --- drivers/usb/common/usb-otg-fsm.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) -- 2.7.4 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 #include -#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);