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: 5900111 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B529D9F373 for ; Fri, 27 Feb 2015 11:24:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DF7BA202EC for ; Fri, 27 Feb 2015 11:24:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A06F7202E6 for ; Fri, 27 Feb 2015 11:24:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750757AbbB0LYn (ORCPT ); Fri, 27 Feb 2015 06:24:43 -0500 Received: from mail-la0-f41.google.com ([209.85.215.41]:40117 "EHLO mail-la0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750777AbbB0LYm (ORCPT ); Fri, 27 Feb 2015 06:24:42 -0500 Received: by labgd6 with SMTP id gd6so16895199lab.7 for ; Fri, 27 Feb 2015 03:24:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Zatu9PIMHSaFy54NSbx09I9oZxGEsWAvL/4v59LnXbU=; b=V9zi/MiSlRAjAqyghh+PfsO08UcLph+dK+b3ojERZL4BOklRhflkV3TX2OylMp0xXr LRL9XpLjeqO6+3ZL/SsTIQu4RVdDgV82yhZp3/2b0S0AMgLgVORQqzh8wM1w+OLPSt+B FKzOqJQ04tFpO8W9btyxwfqsvjZu2Tktb417cbPXHkHF/xspgJd2kR0VCiAguvrpTtlQ guRzCWDEX5ejk5T1zP1IPsOhvagPZe5uPwitblhzJ6PwZVykMBfFo9GbB+ApoDwCoySJ tNMAdFB1EnYy7Zja1ly4elAhE0JohS0Ed3jecFoj9msLCOvNCCSk93u2DVfh6TQQ9t8Z ixHw== X-Gm-Message-State: ALoCoQkpgHdwFSNVSqIFFGoSVxv5soXoxaAzOZP7tlFd0RiTG4q+Uw9urYL3kVDvuCyRtogkE/+X 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-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@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 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, };