From patchwork Wed Jun 12 15:28:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: manjunath.goudar@linaro.org X-Patchwork-Id: 17846 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qe0-f71.google.com (mail-qe0-f71.google.com [209.85.128.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9833323903 for ; Wed, 12 Jun 2013 15:29:25 +0000 (UTC) Received: by mail-qe0-f71.google.com with SMTP id 1sf10217414qee.6 for ; Wed, 12 Jun 2013 08:29:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=r2Uz7LJs60tljpB1R+RJfCbMLTfPT9gHE2b4TblA3jA=; b=HO3Jr4iYFN+yx22ew4iqrkKV4NeBUbbIwpjBYzY8xGehEgAbLapxd4iEvDt7Yhnt/e uXPYpst6OD8z7lb21jtvawHOuFv0xsg81YhKQqTRVwVl5bf2p6FvmQE26+BHZ8fhpId0 3ViH4VtbKItdZOfi4Qx43LNH2lGVHTwqoQLIlsC/Ai6bO6fomPokomtSEMZRNE4AFDGc WrOtUaHp7JfzAZ+c1NUmeXzf91rHl2AGZ2Kv79/uuF6IlEAQfZ9FhWLq8Sp0Gm1OnI+P YDu2TqosTzYANvZlFBJcFCNEKsyU31ZrvGQVFcY4u4VMdGnpF51p93S7J4H+y6n7LOcj fKsw== X-Received: by 10.236.170.74 with SMTP id o50mr11258963yhl.8.1371050965387; Wed, 12 Jun 2013 08:29:25 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.60.163 with SMTP id i3ls1345895qer.49.gmail; Wed, 12 Jun 2013 08:29:25 -0700 (PDT) X-Received: by 10.58.236.42 with SMTP id ur10mr6757659vec.48.1371050965011; Wed, 12 Jun 2013 08:29:25 -0700 (PDT) Received: from mail-ve0-x22b.google.com (mail-ve0-x22b.google.com [2607:f8b0:400c:c01::22b]) by mx.google.com with ESMTPS id fb8si8772169vcb.79.2013.06.12.08.29.24 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Jun 2013 08:29:25 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c01::22b is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c01::22b; Received: by mail-ve0-f171.google.com with SMTP id b10so6771121vea.16 for ; Wed, 12 Jun 2013 08:29:24 -0700 (PDT) X-Received: by 10.220.53.7 with SMTP id k7mr4594925vcg.52.1371050964880; Wed, 12 Jun 2013 08:29:24 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.191.99 with SMTP id gx3csp148675vec; Wed, 12 Jun 2013 08:29:24 -0700 (PDT) X-Received: by 10.66.164.232 with SMTP id yt8mr24498225pab.21.1371050963835; Wed, 12 Jun 2013 08:29:23 -0700 (PDT) Received: from mail-pa0-x236.google.com (mail-pa0-x236.google.com [2607:f8b0:400e:c03::236]) by mx.google.com with ESMTPS id v10si11811106pav.271.2013.06.12.08.29.23 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Jun 2013 08:29:23 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400e:c03::236 is neither permitted nor denied by best guess record for domain of manjunath.goudar@linaro.org) client-ip=2607:f8b0:400e:c03::236; Received: by mail-pa0-f54.google.com with SMTP id kx10so4534297pab.13 for ; Wed, 12 Jun 2013 08:29:23 -0700 (PDT) X-Received: by 10.66.119.196 with SMTP id kw4mr15856925pab.164.1371050963438; Wed, 12 Jun 2013 08:29:23 -0700 (PDT) Received: from localhost.localdomain ([223.239.143.110]) by mx.google.com with ESMTPSA id ri8sm19557052pbc.3.2013.06.12.08.29.19 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Jun 2013 08:29:22 -0700 (PDT) From: Manjunath Goudar To: linux-usb@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, patches@linaro.org, stern@rowland.harvard.edu, arnd@linaro.org, manjunath.goudar@linaro.org, linaro-dev@lists.linaro.org, Arnd Bergmann , Greg KH Subject: [PATCH 07/10] USB: OHCI: Properly handle ohci-platform suspend Date: Wed, 12 Jun 2013 20:58:35 +0530 Message-Id: <1371050918-29472-8-git-send-email-manjunath.goudar@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1371050918-29472-1-git-send-email-manjunath.goudar@linaro.org> References: <1371050918-29472-1-git-send-email-manjunath.goudar@linaro.org> X-Gm-Message-State: ALoCoQnFFpBwH9y1SyTueBXNs6negofDqT73vb4l7OM8orqTjsA21ECHRxfX8AhKfr8IxHz0Vfpx X-Original-Sender: manjunath.goudar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c01::22b is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Suspend scenario in case of ohci-platform glue was not properly handled as it was not suspending generic part of ohci controller.Calling explicitly the ohci_suspend() routine in ohci_platform_suspend() will ensure proper handling of suspend scenario. Signed-off-by: Manjunath Goudar Cc: Arnd Bergmann Cc: Alan Stern Cc: Greg KH Cc: linux-usb@vger.kernel.org --- drivers/usb/host/ohci-platform.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/ohci-platform.c b/drivers/usb/host/ohci-platform.c index bc30475..ad8cb3b 100644 --- a/drivers/usb/host/ohci-platform.c +++ b/drivers/usb/host/ohci-platform.c @@ -142,11 +142,15 @@ static int ohci_platform_suspend(struct device *dev) struct usb_ohci_pdata *pdata = dev->platform_data; struct platform_device *pdev = container_of(dev, struct platform_device, dev); + bool do_wakeup = device_may_wakeup(dev); + int ret; + + ret = ohci_suspend(hcd, do_wakeup); if (pdata->power_suspend) pdata->power_suspend(pdev); - return 0; + return ret; } static int ohci_platform_resume(struct device *dev)