From patchwork Fri Jun 10 13:07:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 69768 Delivered-To: patch@linaro.org Received: by 10.140.106.246 with SMTP id e109csp284969qgf; Fri, 10 Jun 2016 06:08:52 -0700 (PDT) X-Received: by 10.66.131.75 with SMTP id ok11mr2241590pab.87.1465564128479; Fri, 10 Jun 2016 06:08:48 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p6si12098364pay.208.2016.06.10.06.08.48; Fri, 10 Jun 2016 06:08:48 -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 S1161242AbcFJNIl (ORCPT + 30 others); Fri, 10 Jun 2016 09:08:41 -0400 Received: from arroyo.ext.ti.com ([198.47.19.12]:58871 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161092AbcFJNIf (ORCPT ); Fri, 10 Jun 2016 09:08:35 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id u5AD8P5M017138; Fri, 10 Jun 2016 08:08:25 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id u5AD8PmF015447; Fri, 10 Jun 2016 08:08:25 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.294.0; Fri, 10 Jun 2016 08:08:24 -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 u5AD7ODm000644; Fri, 10 Jun 2016 08:08:19 -0500 From: Roger Quadros To: CC: , , , , , , , , , , , , , , , , , , Roger Quadros Subject: [PATCH v10 11/14] usb: otg: use dev_vdbg() instead of VDBG() Date: Fri, 10 Jun 2016 16:07:20 +0300 Message-ID: <1465564043-27163-12-git-send-email-rogerq@ti.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1465564043-27163-1-git-send-email-rogerq@ti.com> References: <1465564043-27163-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_vdbg() for debug messages instead of VDBG(). 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);