From patchwork Mon Oct 20 10:45:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 39041 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f69.google.com (mail-ee0-f69.google.com [74.125.83.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 582C020C2D for ; Mon, 20 Oct 2014 10:46:16 +0000 (UTC) Received: by mail-ee0-f69.google.com with SMTP id b57sf2407684eek.4 for ; Mon, 20 Oct 2014 03:46:15 -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=pC789jK1ox0bnep+HDWi/2o9UYYUoE8vGeNVO7Wvcjc=; b=WRpxkS7aoOj0YCivSbAflEJjvoRKfcRibbKcfxei7AMuhT5wLRcUgL6MJC2uY3BdhA UygI6748nd76NKCgsrKCHZ/Qy+XathUOFucMy3b67YuPBqpf6iBQO8gf04qIhnynsfkt vLbePKLXEr/GSpXs77HZLr//R3FXAmr8lJd4M5nySyBGMamSgDQneytEV+ttp+m1G/yo QL5rZA6SgZfrXUDmvgsM36wWsayfTHWGx8zJpQh0vCMVWfq6HY0RK3bew/zYYMyQZ9GI DLk9yJ+hQU9VSecAzeL79evocFXnk6HpO6pi0GtD/euW3FuuJMchXIewrxn31UU5guuy Ricg== X-Gm-Message-State: ALoCoQm+s4ByZnUKZ44Y5eSt2IJlkAQ9FwwVtAGo76he6lFQD/jtZ0c5zvNoBe4TI644KAoIljhU X-Received: by 10.181.27.135 with SMTP id jg7mr2328581wid.5.1413801975464; Mon, 20 Oct 2014 03:46:15 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.45.101 with SMTP id l5ls398330lam.103.gmail; Mon, 20 Oct 2014 03:46:15 -0700 (PDT) X-Received: by 10.152.120.73 with SMTP id la9mr26492822lab.23.1413801975303; Mon, 20 Oct 2014 03:46:15 -0700 (PDT) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com. [209.85.215.47]) by mx.google.com with ESMTPS id iz4si10294253lbc.8.2014.10.20.03.46.15 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 20 Oct 2014 03:46:15 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) client-ip=209.85.215.47; Received: by mail-la0-f47.google.com with SMTP id pv20so3629005lab.6 for ; Mon, 20 Oct 2014 03:46:15 -0700 (PDT) X-Received: by 10.152.29.8 with SMTP id f8mr26537380lah.56.1413801975209; Mon, 20 Oct 2014 03:46:15 -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 c5csp278592lbz; Mon, 20 Oct 2014 03:46:14 -0700 (PDT) X-Received: by 10.70.4.164 with SMTP id l4mr2544555pdl.137.1413801973218; Mon, 20 Oct 2014 03:46:13 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m5si7471476pdl.134.2014.10.20.03.46.12 for ; Mon, 20 Oct 2014 03:46:13 -0700 (PDT) Received-SPF: none (google.com: linux-samsung-soc-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 S1753634AbaJTKqJ (ORCPT + 6 others); Mon, 20 Oct 2014 06:46:09 -0400 Received: from mailout4.w1.samsung.com ([210.118.77.14]:33978 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753264AbaJTKpx (ORCPT ); Mon, 20 Oct 2014 06:45:53 -0400 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NDQ000WOOP10M10@mailout4.w1.samsung.com>; Mon, 20 Oct 2014 11:48:37 +0100 (BST) X-AuditID: cbfec7f5-b7f956d000005ed7-41-5444e7deefb8 Received: from eusync4.samsung.com ( [203.254.199.214]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id AF.82.24279.ED7E4445; Mon, 20 Oct 2014 11:45:50 +0100 (BST) Received: from amdc1339.digital.local ([106.116.147.30]) by eusync4.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0NDQ009U7OK7MS20@eusync4.samsung.com>; Mon, 20 Oct 2014 11:45:50 +0100 (BST) From: Marek Szyprowski To: linux-usb@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Felipe Balbi , Kyungmin Park , Robert Baldyga , Paul Zimmerman , Krzysztof Kozlowski Subject: [PATCH v2 05/10] usb: dwc2/gadget: move setting last reset time to s3c_hsotg_core_init Date: Mon, 20 Oct 2014 12:45:35 +0200 Message-id: <1413801940-31086-6-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.2 In-reply-to: <1413801940-31086-1-git-send-email-m.szyprowski@samsung.com> References: <1413801940-31086-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrMJMWRmVeSWpSXmKPExsVy+t/xa7r3nruEGPzpEbI4eL/e4vULQ4uz TW/YLWac38dksWhZK7PF2iN32S22T5nOZPHg8E52Bw6Pvi2rGD227P/M6HH8xnYmj8+b5AJY orhsUlJzMstSi/TtErgy5jzcwl7wnqviU9tnpgbGFxxdjBwcEgImEg139boYOYFMMYkL99az dTFycQgJLGWUeHZiGQuE08ck0TDnAhNIFZuAoUTX2y42EFtEwEFiydI7YDazwE9GiclTbUBs YYFEiVkf/oPVswioSpxY/YERxOYV8JCYemktG8Q2OYn/L1eA1XAKeEq8eTENrEYIqGbT8pcs Exh5FzAyrGIUTS1NLihOSs810itOzC0uzUvXS87P3cQICaivOxiXHrM6xCjAwajEw7vDzCVE iDWxrLgy9xCjBAezkghv922gEG9KYmVValF+fFFpTmrxIUYmDk6pBsa9j3afYtv04Ev/pMP/ 8wQtjlxjcj/K+UfrxPXvNw7XSBtP9Pi20N5utnzukdiwFqOJqdfEz/Jvk12+IOuJjNb2fc8+ P9oTqcq3wHqt1u1twY0Cs78zf+kO63r7JbbwyD4n7tlLpeYtdDn84Za57Yas9/MfXptzxPNi rvvjCVGloX+U9Hi2JhTdV2Ipzkg01GIuKk4EANU8KrMGAgAA Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-samsung-soc@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.215.47 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 Acked-by: Paul Zimmerman --- 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 fd52a8b23649..c1dad46bbbdd 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; @@ -3667,7 +3667,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);