From patchwork Fri Feb 27 11:24:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Grygorii.Strashko@linaro.org" X-Patchwork-Id: 45218 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 52F7720674 for ; Fri, 27 Feb 2015 11:24:49 +0000 (UTC) Received: by lbiz11 with SMTP id z11sf13897289lbi.2 for ; Fri, 27 Feb 2015 03:24:48 -0800 (PST) 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:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=EBW9R45/QLFpQxMaogfx2IFOu72rvKY66PMY5nWzOz4=; b=YTDKzIHZ76NoVmCmKl7pyD2ybxFsoftCv7vWnyK1ng6OCvyRJ5WpnmBwf1SQEr6sJx SNYaC62huxF1lYR3Ad3tV2SHA4cijcdByQAFBnaJ6NhziK634vjSI5NfSwK1tWv9RZki KmPKx1xnoP/ljhTWn+NpX5t4hFPL59zhY+Oy+rxBXiU0WwIMSPWssQQT8Egw3XFiTXtM jzmo/P1sBDMtOqUH1VmId3qELtOcsm9jkINVDxBGotXl06clKxDN0VRAmDb2rC6/2htM fDJE7bss0uS9WNOvraSUFMiVyB0e4To2D7K4KqV48H1AZvnSV9ESHCuB+JVUHGv6VaDb JRgg== X-Gm-Message-State: ALoCoQlO5khUfDsiobtcLBpbaTtDhFF2uqvQszZIC3JsXqUoeRPPW/J0EDl98CnFImpSKVnORkIk X-Received: by 10.112.147.35 with SMTP id th3mr1745546lbb.15.1425036287939; Fri, 27 Feb 2015 03:24:47 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.88.9 with SMTP id bc9ls165699lab.101.gmail; Fri, 27 Feb 2015 03:24:47 -0800 (PST) X-Received: by 10.112.12.196 with SMTP id a4mr12085281lbc.8.1425036287745; Fri, 27 Feb 2015 03:24:47 -0800 (PST) Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com. [209.85.217.169]) by mx.google.com with ESMTPS id o7si2733531laj.32.2015.02.27.03.24.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Feb 2015 03:24:47 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) client-ip=209.85.217.169; Received: by lbvp9 with SMTP id p9so16672065lbv.0 for ; Fri, 27 Feb 2015 03:24:47 -0800 (PST) X-Received: by 10.152.88.4 with SMTP id bc4mr12030126lab.86.1425036287577; Fri, 27 Feb 2015 03:24:47 -0800 (PST) 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.35.133 with SMTP id h5csp3870777lbj; Fri, 27 Feb 2015 03:24:46 -0800 (PST) X-Received: by 10.68.142.136 with SMTP id rw8mr22924084pbb.136.1425036285711; Fri, 27 Feb 2015 03:24:45 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ap4si4919760pad.210.2015.02.27.03.24.44; Fri, 27 Feb 2015 03:24:45 -0800 (PST) Received-SPF: none (google.com: linux-mmc-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 S1751109AbbB0LYn (ORCPT + 3 others); Fri, 27 Feb 2015 06:24:43 -0500 Received: from mail-lb0-f182.google.com ([209.85.217.182]:34709 "EHLO mail-lb0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750757AbbB0LYm (ORCPT ); Fri, 27 Feb 2015 06:24:42 -0500 Received: by lbdu14 with SMTP id u14so16576558lbd.1 for ; Fri, 27 Feb 2015 03:24:41 -0800 (PST) X-Received: by 10.152.42.133 with SMTP id o5mr12002949lal.21.1425036281316; Fri, 27 Feb 2015 03:24:41 -0800 (PST) Received: from localhost ([195.238.92.128]) by mx.google.com with ESMTPSA id i13sm770392lab.38.2015.02.27.03.24.40 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 27 Feb 2015 03:24:40 -0800 (PST) From: To: Chris Ball , Ulf Hansson , Felipe Balbi Cc: , , NeilBrown , linux-mmc@vger.kernel.org, , Russ Dill , Grygorii Strashko Subject: [PATCH] mmc: omap_hsmmc: add hibernation support Date: Fri, 27 Feb 2015 13:24:34 +0200 Message-Id: <1425036274-9017-1-git-send-email-grygorii.strashko@linaro.org> X-Mailer: git-send-email 1.9.1 Sender: linux-mmc-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: grygorii.strashko@linaro.org 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.169 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: , From: Russ Dill Setting a dev_pm_ops suspend/resume pair but not a set of hibernation functions means those pm functions will not be called upon hibernation. Fix this by using SET_SYSTEM_SLEEP_PM_OPS, which appropriately assigns the suspend and hibernation handlers and move omap_hsmmc_x callbacks under CONFIG_PM_SLEEP to avoid build warnings. Signed-off-by: Russ Dill [Grygorii.Strashko@linaro.org: rebased on top of K4.0] Signed-off-by: Grygorii Strashko --- original patch: https://github.com/russdill/linux/commit/2ea98def0717f0918426c2004122c63d52cff1b4 drivers/mmc/host/omap_hsmmc.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index f84cfb0..9cc1ea3 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -2236,7 +2236,7 @@ static int omap_hsmmc_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM +#ifdef CONFIG_PM_SLEEP static int omap_hsmmc_suspend(struct device *dev) { struct omap_hsmmc_host *host = dev_get_drvdata(dev); @@ -2292,10 +2292,6 @@ static int omap_hsmmc_resume(struct device *dev) pm_runtime_put_autosuspend(host->dev); return 0; } - -#else -#define omap_hsmmc_suspend NULL -#define omap_hsmmc_resume NULL #endif static int omap_hsmmc_runtime_suspend(struct device *dev) @@ -2376,8 +2372,7 @@ static int omap_hsmmc_runtime_resume(struct device *dev) } static struct dev_pm_ops omap_hsmmc_dev_pm_ops = { - .suspend = omap_hsmmc_suspend, - .resume = omap_hsmmc_resume, + SET_SYSTEM_SLEEP_PM_OPS(omap_hsmmc_suspend, omap_hsmmc_resume) .runtime_suspend = omap_hsmmc_runtime_suspend, .runtime_resume = omap_hsmmc_runtime_resume, };