From patchwork Thu Oct 16 12:58:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 5091721 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E08119F30B for ; Thu, 16 Oct 2014 12:58:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2387E20166 for ; Thu, 16 Oct 2014 12:58:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D4E5B201ED for ; Thu, 16 Oct 2014 12:58:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752479AbaJPM6g (ORCPT ); Thu, 16 Oct 2014 08:58:36 -0400 Received: from mailout3.w1.samsung.com ([210.118.77.13]:54147 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751704AbaJPM6f (ORCPT ); Thu, 16 Oct 2014 08:58:35 -0400 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NDJ000R0G67F0B0@mailout3.w1.samsung.com>; Thu, 16 Oct 2014 14:01:19 +0100 (BST) X-AuditID: cbfec7f4-b7f156d0000063c7-c0-543fc0f3e8af Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id BD.65.25543.3F0CF345; Thu, 16 Oct 2014 13:58:27 +0100 (BST) Received: from amdc1339.digital.local ([106.116.147.30]) by eusync2.samsung.com (Oracle Communications Messaging Server 7u4-23.01 (7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0NDJ00F34G17BB00@eusync2.samsung.com>; Thu, 16 Oct 2014 13:58:27 +0100 (BST) From: Marek Szyprowski To: linux-usb@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Kyungmin Park , Robert Baldyga , Paul Zimmerman , Krzysztof Kozlowski Subject: [PATCH 5/9] usb: dwc2/gadget: move setting last reset time to s3c_hsotg_core_init Date: Thu, 16 Oct 2014 14:58:01 +0200 Message-id: <1413464285-24172-6-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.2 In-reply-to: <1413464285-24172-1-git-send-email-m.szyprowski@samsung.com> References: <1413464285-24172-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrDJMWRmVeSWpSXmKPExsVy+t/xK7qfD9iHGEw5xGfx+oWhxdmmN+wW M87vY7JYtKyV2WLtkbvsFtunTGeyeHB4J7sDu0ffllWMHlv2f2b0+LxJLoA5issmJTUnsyy1 SN8ugStj7/VFbAXvuSpmTNzH2sD4gqOLkZNDQsBEYtOaf+wQtpjEhXvr2boYuTiEBJYySsxt mMsK4fQxSVw48pAFpIpNwFCi620XG4gtIuAgsWTpHbAOZoE7jBLr939iAkkIC8RIbOz9DDaW RUBV4sCnGWA2r4CHxIWedywQ6+Qk/r9cAVbPKeApsWvzSmYQWwio5vzV6YwTGHkXMDKsYhRN LU0uKE5KzzXUK07MLS7NS9dLzs/dxAgJoS87GBcfszrEKMDBqMTDqxFsHyLEmlhWXJl7iFGC g1lJhHfRJKAQb0piZVVqUX58UWlOavEhRiYOTqkGRjbVwFkfZjd3qBwvb1/LKZ9yQ0bsprdW FePTLbH7cn1vRR+//O21G+MPnTr1tTK/D/06lzb56nXJzG9G1770ZB3qnrg74uimes5XE9/n /bB+UnmNM+Io36sVs8/zz2t668rduzj0MOs2r/e+6Y1G7Vx+/d72domqYpXOJYlcctucrupw Z7w/rcRSnJFoqMVcVJwIAOyMSSH/AQAA Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch removes duplicated code and sets last_rst variable in the function which does the hardware reset. Signed-off-by: Marek Szyprowski --- drivers/usb/dwc2/gadget.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index 178a6ea5eef8..1ba0682fb252 100644 --- a/drivers/usb/dwc2/gadget.c +++ b/drivers/usb/dwc2/gadget.c @@ -2247,6 +2247,8 @@ static void s3c_hsotg_core_init(struct s3c_hsotg *hsotg) /* must be at-least 3ms to allow bus to see disconnect */ mdelay(3); + hsotg->last_rst = jiffies; + /* remove the soft-disconnect and let's go */ __bic32(hsotg->regs + DCTL, DCTL_SFTDISCON); } @@ -2347,7 +2349,6 @@ irq_retry: -ECONNRESET, true); s3c_hsotg_core_init(hsotg); - hsotg->last_rst = jiffies; } } } @@ -2908,7 +2909,6 @@ static int s3c_hsotg_udc_start(struct usb_gadget *gadget, goto err; } - hsotg->last_rst = jiffies; dev_info(hsotg->dev, "bound driver %s\n", driver->driver.name); return 0; @@ -3669,7 +3669,6 @@ static int s3c_hsotg_resume(struct platform_device *pdev) } spin_lock_irqsave(&hsotg->lock, flags); - hsotg->last_rst = jiffies; s3c_hsotg_phy_enable(hsotg); s3c_hsotg_core_init(hsotg); spin_unlock_irqrestore(&hsotg->lock, flags);