From patchwork Thu Jun 9 07:55:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 69699 Delivered-To: patch@linaro.org Received: by 10.140.106.246 with SMTP id e109csp195554qgf; Thu, 9 Jun 2016 00:56:39 -0700 (PDT) X-Received: by 10.66.123.69 with SMTP id ly5mr10835686pab.57.1465458999033; Thu, 09 Jun 2016 00:56:39 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q7si2984111paa.187.2016.06.09.00.56.38; Thu, 09 Jun 2016 00:56:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-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 devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423065AbcFIH4h (ORCPT + 7 others); Thu, 9 Jun 2016 03:56:37 -0400 Received: from arroyo.ext.ti.com ([198.47.19.12]:43489 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933205AbcFIH4g (ORCPT ); Thu, 9 Jun 2016 03:56:36 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id u597tBTa021554; Thu, 9 Jun 2016 02:55:11 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id u597tBks023687; Thu, 9 Jun 2016 02:55:11 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.294.0; Thu, 9 Jun 2016 02:55:10 -0500 Received: from [192.168.2.6] (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id u597t59L002310; Thu, 9 Jun 2016 02:55:06 -0500 Subject: [PATCH v10 11/14] usb: otg: use dev_dbg() instead of VDBG() To: , Joe Perches References: <1465376626-30122-1-git-send-email-rogerq@ti.com> <1465376626-30122-12-git-send-email-rogerq@ti.com> CC: , , , , , , , , , , , , , , , , , From: Roger Quadros Message-ID: <575920D9.7080905@ti.com> Date: Thu, 9 Jun 2016 10:55:05 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <1465376626-30122-12-git-send-email-rogerq@ti.com> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@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 --- v10: - in the commit message say dev_vdbg() instead of dev_dbg() drivers/usb/common/usb-otg-fsm.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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);