All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: sdhci-pltfm: Fix linking err for sdhci-brcmstb
@ 2021-01-26  9:52 Ulf Hansson
  2021-01-26 12:27 ` Nicolas Schichan
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Ulf Hansson @ 2021-01-26  9:52 UTC (permalink / raw)
  To: linux-mmc, Ulf Hansson, Adrian Hunter
  Cc: Arnd Bergmann, Florian Fainelli, Nicolas Schichan, stable

The implementation of sdhci_pltfm_suspend() is only available when
CONFIG_PM_SLEEP is set, which triggers a linking error:

"undefined symbol: sdhci_pltfm_suspend" when building sdhci-brcmstb.c.

Fix this by implementing the missing stubs when CONFIG_PM_SLEEP is unset.

Reported-by: Arnd Bergmann <arnd@arndb.de>
Suggested-by: Florian Fainelli <f.fainelli@gmail.com>
Cc: Nicolas Schichan <nschichan@freebox.fr>
Fixes: 5b191dcba719 ("mmc: sdhci-brcmstb: Fix mmc timeout errors on S5 suspend")
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/mmc/host/sdhci-pltfm.h | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sdhci-pltfm.h b/drivers/mmc/host/sdhci-pltfm.h
index 6301b81cf573..9bd717ff784b 100644
--- a/drivers/mmc/host/sdhci-pltfm.h
+++ b/drivers/mmc/host/sdhci-pltfm.h
@@ -111,8 +111,13 @@ static inline void *sdhci_pltfm_priv(struct sdhci_pltfm_host *host)
 	return host->private;
 }
 
+extern const struct dev_pm_ops sdhci_pltfm_pmops;
+#ifdef CONFIG_PM_SLEEP
 int sdhci_pltfm_suspend(struct device *dev);
 int sdhci_pltfm_resume(struct device *dev);
-extern const struct dev_pm_ops sdhci_pltfm_pmops;
+#else
+static inline int sdhci_pltfm_suspend(struct device *dev) { return 0; }
+static inline int sdhci_pltfm_resume(struct device *dev) { return 0; }
+#endif
 
 #endif /* _DRIVERS_MMC_SDHCI_PLTFM_H */
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] mmc: sdhci-pltfm: Fix linking err for sdhci-brcmstb
  2021-01-26  9:52 [PATCH] mmc: sdhci-pltfm: Fix linking err for sdhci-brcmstb Ulf Hansson
@ 2021-01-26 12:27 ` Nicolas Schichan
  2021-01-26 14:09 ` Arnd Bergmann
  2021-01-26 17:26 ` Florian Fainelli
  2 siblings, 0 replies; 4+ messages in thread
From: Nicolas Schichan @ 2021-01-26 12:27 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: linux-mmc, Adrian Hunter, Arnd Bergmann, Florian Fainelli, stable

On Tue, Jan 26, 2021 at 10:52 AM Ulf Hansson <ulf.hansson@linaro.org> wrote:
>
> The implementation of sdhci_pltfm_suspend() is only available when
> CONFIG_PM_SLEEP is set, which triggers a linking error:
>
> "undefined symbol: sdhci_pltfm_suspend" when building sdhci-brcmstb.c.
>
> Fix this by implementing the missing stubs when CONFIG_PM_SLEEP is unset.
>
> Reported-by: Arnd Bergmann <arnd@arndb.de>
> Suggested-by: Florian Fainelli <f.fainelli@gmail.com>
> Cc: Nicolas Schichan <nschichan@freebox.fr>
> Fixes: 5b191dcba719 ("mmc: sdhci-brcmstb: Fix mmc timeout errors on S5 suspend")
> Cc: stable@vger.kernel.org
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> ---
>  drivers/mmc/host/sdhci-pltfm.h | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sdhci-pltfm.h b/drivers/mmc/host/sdhci-pltfm.h
> index 6301b81cf573..9bd717ff784b 100644
> --- a/drivers/mmc/host/sdhci-pltfm.h
> +++ b/drivers/mmc/host/sdhci-pltfm.h
> @@ -111,8 +111,13 @@ static inline void *sdhci_pltfm_priv(struct sdhci_pltfm_host *host)
>         return host->private;
>  }
>
> +extern const struct dev_pm_ops sdhci_pltfm_pmops;
> +#ifdef CONFIG_PM_SLEEP
>  int sdhci_pltfm_suspend(struct device *dev);
>  int sdhci_pltfm_resume(struct device *dev);
> -extern const struct dev_pm_ops sdhci_pltfm_pmops;
> +#else
> +static inline int sdhci_pltfm_suspend(struct device *dev) { return 0; }
> +static inline int sdhci_pltfm_resume(struct device *dev) { return 0; }
> +#endif
>
>  #endif /* _DRIVERS_MMC_SDHCI_PLTFM_H */
> --
> 2.25.1
>

Hello,

I have just given this patch a test and no issues here, so:

Tested-By: Nicolas Schichan <nschichan@freeebox.fr>

Regards,

--
Nicolas Schichan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mmc: sdhci-pltfm: Fix linking err for sdhci-brcmstb
  2021-01-26  9:52 [PATCH] mmc: sdhci-pltfm: Fix linking err for sdhci-brcmstb Ulf Hansson
  2021-01-26 12:27 ` Nicolas Schichan
@ 2021-01-26 14:09 ` Arnd Bergmann
  2021-01-26 17:26 ` Florian Fainelli
  2 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2021-01-26 14:09 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: linux-mmc, Adrian Hunter, Arnd Bergmann, Florian Fainelli,
	Nicolas Schichan, # 3.4.x

On Tue, Jan 26, 2021 at 10:52 AM Ulf Hansson <ulf.hansson@linaro.org> wrote:
>
> The implementation of sdhci_pltfm_suspend() is only available when
> CONFIG_PM_SLEEP is set, which triggers a linking error:
>
> "undefined symbol: sdhci_pltfm_suspend" when building sdhci-brcmstb.c.
>
> Fix this by implementing the missing stubs when CONFIG_PM_SLEEP is unset.
>
> Reported-by: Arnd Bergmann <arnd@arndb.de>
> Suggested-by: Florian Fainelli <f.fainelli@gmail.com>
> Cc: Nicolas Schichan <nschichan@freebox.fr>
> Fixes: 5b191dcba719 ("mmc: sdhci-brcmstb: Fix mmc timeout errors on S5 suspend")
> Cc: stable@vger.kernel.org
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> ---

Acked-by: Arnd Bergmann <arnd@arndb.de>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mmc: sdhci-pltfm: Fix linking err for sdhci-brcmstb
  2021-01-26  9:52 [PATCH] mmc: sdhci-pltfm: Fix linking err for sdhci-brcmstb Ulf Hansson
  2021-01-26 12:27 ` Nicolas Schichan
  2021-01-26 14:09 ` Arnd Bergmann
@ 2021-01-26 17:26 ` Florian Fainelli
  2 siblings, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2021-01-26 17:26 UTC (permalink / raw)
  To: Ulf Hansson, linux-mmc, Adrian Hunter, Al Cooper
  Cc: Arnd Bergmann, Nicolas Schichan, stable

+Al,

On 1/26/2021 1:52 AM, Ulf Hansson wrote:
> The implementation of sdhci_pltfm_suspend() is only available when
> CONFIG_PM_SLEEP is set, which triggers a linking error:
> 
> "undefined symbol: sdhci_pltfm_suspend" when building sdhci-brcmstb.c.
> 
> Fix this by implementing the missing stubs when CONFIG_PM_SLEEP is unset.
> 
> Reported-by: Arnd Bergmann <arnd@arndb.de>
> Suggested-by: Florian Fainelli <f.fainelli@gmail.com>
> Cc: Nicolas Schichan <nschichan@freebox.fr>
> Fixes: 5b191dcba719 ("mmc: sdhci-brcmstb: Fix mmc timeout errors on S5 suspend")
> Cc: stable@vger.kernel.org
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-01-26 21:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-26  9:52 [PATCH] mmc: sdhci-pltfm: Fix linking err for sdhci-brcmstb Ulf Hansson
2021-01-26 12:27 ` Nicolas Schichan
2021-01-26 14:09 ` Arnd Bergmann
2021-01-26 17:26 ` Florian Fainelli

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.