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: 38806 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5B96720973 for ; Thu, 16 Oct 2014 12:58:43 +0000 (UTC) Received: by mail-lb0-f198.google.com with SMTP id 10sf1881978lbg.1 for ; Thu, 16 Oct 2014 05:58:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=6TeuCdHSiZqKh13NYZdba8JtOPsjzt88GR9KnFoR/9w=; b=Z+qqDzkWobYQLa+1GPcVQl98mqslNmZdpnI6wwmNWnLJYc8BulDHebpYH1w3oahF4B ecl0/uwC+oo1mRR3Tj30otW2RGJM4DFi8QSVQFkF7UuOzqYkBRwAuJJaY34GjhHdemkG oFr7vmi7aJx5HG3EwachKcN6HFIkuNYDYzI+zO7jzIA1bKRJqR9A3CDsx+FUfJcvHCGA c9zADvxW7V0EOxfgSZgwlqbizn4OrQBfGOFMhlZi4mHTiGlJpYkvUqV/0VeuSO+1Srfd 2G+cm2XyL6RfoihduN0669ztYkrXBMcTEmwEccNWwmL6BzQwDcUdHHlUa/f3xhfWBwqt ycFQ== X-Gm-Message-State: ALoCoQnlmWFYLbmwZTl6giQrNOBaGRBKpCAMLxF1s9S2vZw6/nSaC35te2NTxlZKbF+rmTfLKxEM X-Received: by 10.112.55.10 with SMTP id n10mr95212lbp.14.1413464322155; Thu, 16 Oct 2014 05:58:42 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.9.130 with SMTP id z2ls159110laa.61.gmail; Thu, 16 Oct 2014 05:58:41 -0700 (PDT) X-Received: by 10.153.9.7 with SMTP id do7mr1422122lad.98.1413464321834; Thu, 16 Oct 2014 05:58:41 -0700 (PDT) Received: from mail-lb0-f171.google.com (mail-lb0-f171.google.com [209.85.217.171]) by mx.google.com with ESMTPS id 2si161289lal.27.2014.10.16.05.58.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 16 Oct 2014 05:58:41 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.171 as permitted sender) client-ip=209.85.217.171; Received: by mail-lb0-f171.google.com with SMTP id z12so2756743lbi.30 for ; Thu, 16 Oct 2014 05:58:41 -0700 (PDT) X-Received: by 10.152.202.135 with SMTP id ki7mr1541783lac.40.1413464321635; Thu, 16 Oct 2014 05:58:41 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.84.229 with SMTP id c5csp33482lbz; Thu, 16 Oct 2014 05:58:41 -0700 (PDT) X-Received: by 10.70.90.108 with SMTP id bv12mr1244929pdb.158.1413464319438; Thu, 16 Oct 2014 05:58:39 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id yk7si11920691pab.135.2014.10.16.05.58.38 for ; Thu, 16 Oct 2014 05:58:39 -0700 (PDT) Received-SPF: none (google.com: linux-usb-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752482AbaJPM6g (ORCPT + 3 others); 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-usb-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: m.szyprowski@samsung.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.171 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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);