[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210208145821.401880161@linuxfoundation.org>
Date: Mon, 8 Feb 2021 16:01:02 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Arnd Bergmann <arnd@...db.de>,
Florian Fainelli <f.fainelli@...il.com>,
Nicolas Schichan <nschichan@...eebox.fr>,
Ulf Hansson <ulf.hansson@...aro.org>
Subject: [PATCH 5.10 075/120] mmc: sdhci-pltfm: Fix linking err for sdhci-brcmstb
From: Ulf Hansson <ulf.hansson@...aro.org>
commit d7fb9c24209556478e65211d7a1f056f2d43cceb upstream.
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@...db.de>
Suggested-by: Florian Fainelli <f.fainelli@...il.com>
Fixes: 5b191dcba719 ("mmc: sdhci-brcmstb: Fix mmc timeout errors on S5 suspend")
Cc: stable@...r.kernel.org
Tested-By: Nicolas Schichan <nschichan@...eebox.fr>
Acked-by: Arnd Bergmann <arnd@...db.de>
Acked-by: Florian Fainelli <f.fainelli@...il.com>
Signed-off-by: Ulf Hansson <ulf.hansson@...aro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/mmc/host/sdhci-pltfm.h | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
--- a/drivers/mmc/host/sdhci-pltfm.h
+++ b/drivers/mmc/host/sdhci-pltfm.h
@@ -111,8 +111,13 @@ static inline void *sdhci_pltfm_priv(str
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 */
Powered by blists - more mailing lists