lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 20 Nov 2011 15:29:51 -0600
From:	David Fries <david@...es.net>
To:	linux-kernel@...r.kernel.org
Cc:	linux-mmc@...r.kernel.org, Chris Ball <cjb@...top.org>,
	Adrian Hunter <adrian.hunter@...el.com>,
	Yunpeng Gao <yunpeng.gao@...el.com>
Subject: [PATCH] sdhci-pci register legacy PCI PM or runtime PM not both

From: David Fries <David@...es.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@...es.net>
Cc: linux-mmc@...r.kernel.org
Cc: Chris Ball <cjb@...top.org>
Cc: Adrian Hunter <adrian.hunter@...el.com>
Cc: Yunpeng Gao <yunpeng.gao@...el.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ