* [PATCH] sdhci-pci register legacy PCI PM or runtime PM not both
@ 2011-11-20 21:29 David Fries
2011-11-21 8:48 ` Adrian Hunter
0 siblings, 1 reply; 3+ messages in thread
From: David Fries @ 2011-11-20 21:29 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-mmc, Chris Ball, Adrian Hunter, Yunpeng Gao
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
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] sdhci-pci register legacy PCI PM or runtime PM not both
2011-11-20 21:29 [PATCH] sdhci-pci register legacy PCI PM or runtime PM not both David Fries
@ 2011-11-21 8:48 ` Adrian Hunter
2011-11-22 0:47 ` David Fries
0 siblings, 1 reply; 3+ messages in thread
From: Adrian Hunter @ 2011-11-21 8:48 UTC (permalink / raw)
To: David Fries; +Cc: linux-kernel, linux-mmc, Chris Ball, Yunpeng Gao
On 20/11/11 23:29, David Fries wrote:
> From: David Fries <David@Fries.net>
>
> pci_has_legacy_pm_support says to not register both legacy PM
> and runtime PM callbacks, modified ifdefs.
Hasn't this already been done in Chris mmc tree i.e.
commit f353f593fe449178a8cb01cefe559dba125ab8b1
Author: Manuel Lauss <manuel.lauss@googlemail.com>
Date: Thu Nov 3 11:09:45 2011 +0100
mmc: sdhci: remove "state" argument from sdhci_suspend_host
Drop the "state" argument from sdhci_suspend_host. Its only user is the
PCI glue; this allows to move all SDHCI glues to use dev_pm_ops instead.
Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/sdhci-cns3xxx.c | 5 +----
drivers/mmc/host/sdhci-dove.c | 5 +----
drivers/mmc/host/sdhci-esdhc-imx.c | 5 +----
drivers/mmc/host/sdhci-of-esdhc.c | 5 +----
drivers/mmc/host/sdhci-of-hlwd.c | 5 +----
drivers/mmc/host/sdhci-pci.c | 26 +++++++++++++-------------
drivers/mmc/host/sdhci-pltfm.c | 18 +++++++++++-------
drivers/mmc/host/sdhci-pltfm.h | 6 ++++--
drivers/mmc/host/sdhci-pxav2.c | 5 +----
drivers/mmc/host/sdhci-pxav3.c | 5 +----
drivers/mmc/host/sdhci-s3c.c | 21 ++++++++++++++-------
drivers/mmc/host/sdhci-tegra.c | 5 +----
drivers/mmc/host/sdhci.c | 2 +-
drivers/mmc/host/sdhci.h | 2 +-
14 files changed, 52 insertions(+), 63 deletions(-)
>
> 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
>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] sdhci-pci register legacy PCI PM or runtime PM not both
2011-11-21 8:48 ` Adrian Hunter
@ 2011-11-22 0:47 ` David Fries
0 siblings, 0 replies; 3+ messages in thread
From: David Fries @ 2011-11-22 0:47 UTC (permalink / raw)
To: Adrian Hunter; +Cc: linux-kernel, linux-mmc, Chris Ball, Yunpeng Gao
On Mon, Nov 21, 2011 at 10:48:20AM +0200, Adrian Hunter wrote:
> On 20/11/11 23:29, David Fries wrote:
> > From: David Fries <David@Fries.net>
> >
> > pci_has_legacy_pm_support says to not register both legacy PM
> > and runtime PM callbacks, modified ifdefs.
>
> Hasn't this already been done in Chris mmc tree i.e.
>
> commit f353f593fe449178a8cb01cefe559dba125ab8b1
> Author: Manuel Lauss <manuel.lauss@googlemail.com>
> Date: Thu Nov 3 11:09:45 2011 +0100
>
> mmc: sdhci: remove "state" argument from sdhci_suspend_host
Good call. It looks like a better solution than what I posted. I
tried it and it also worked. I would classify this as a regression in
mainline (suspend didn't used to generate warnings) until a fix is
merged. I'm good for now, but I doubt I'll be the only one running
into it.
--
David Fries <david@fries.net> PGP pub CB1EE8F0
http://fries.net/~david/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-11-22 0:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-20 21:29 [PATCH] sdhci-pci register legacy PCI PM or runtime PM not both David Fries
2011-11-21 8:48 ` Adrian Hunter
2011-11-22 0:47 ` David Fries
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox