From: David Fries <david@fries.net>
To: linux-kernel@vger.kernel.org
Cc: linux-mmc@vger.kernel.org, Chris Ball <cjb@laptop.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Yunpeng Gao <yunpeng.gao@intel.com>
Subject: [PATCH] sdhci-pci register legacy PCI PM or runtime PM not both
Date: Sun, 20 Nov 2011 15:29:51 -0600 [thread overview]
Message-ID: <20111120212951.GA4577@spacedout.fries.net> (raw)
From: David Fries <David@Fries.net>
pci_has_legacy_pm_support says to not register both legacy PM
and runtime PM callbacks, modified ifdefs.
Signed-off-by: David Fries <David@Fries.net>
Cc: linux-mmc@vger.kernel.org
Cc: Chris Ball <cjb@laptop.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Yunpeng Gao <yunpeng.gao@intel.com>
---
drivers/mmc/host/sdhci-pci.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c
index d833d9c..eca6e84 100644
--- a/drivers/mmc/host/sdhci-pci.c
+++ b/drivers/mmc/host/sdhci-pci.c
@@ -991,7 +991,8 @@ static struct sdhci_ops sdhci_pci_ops = {
* *
\*****************************************************************************/
-#ifdef CONFIG_PM
+/* Register legacy PM or PM runtime, not both. */
+#if defined(CONFIG_PM) && !defined(CONFIG_PM_RUNTIME)
static int sdhci_pci_suspend(struct pci_dev *pdev, pm_message_t state)
{
@@ -1085,12 +1086,12 @@ static int sdhci_pci_resume(struct pci_dev *pdev)
return 0;
}
-#else /* CONFIG_PM */
+#else /* CONFIG_PM && !CONFIG_PM_RUNTIME */
#define sdhci_pci_suspend NULL
#define sdhci_pci_resume NULL
-#endif /* CONFIG_PM */
+#endif /* CONFIG_PM && !CONFIG_PM_RUNTIME */
#ifdef CONFIG_PM_RUNTIME
--
1.7.7.1
next reply other threads:[~2011-11-20 21:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-20 21:29 David Fries [this message]
2011-11-21 8:48 ` [PATCH] sdhci-pci register legacy PCI PM or runtime PM not both Adrian Hunter
2011-11-22 0:47 ` David Fries
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111120212951.GA4577@spacedout.fries.net \
--to=david@fries.net \
--cc=adrian.hunter@intel.com \
--cc=cjb@laptop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=yunpeng.gao@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.