diff options
author | Ulf Hansson <[email protected]> | 2021-01-26 10:43:13 +0100 |
---|---|---|
committer | Ulf Hansson <[email protected]> | 2021-02-01 11:13:09 +0100 |
commit | d7fb9c24209556478e65211d7a1f056f2d43cceb (patch) | |
tree | db1c377a972ba26af923147e2cb6023eb3f12016 | |
parent | f92e04f764b86e55e522988e6f4b6082d19a2721 (diff) |
mmc: sdhci-pltfm: Fix linking err for sdhci-brcmstb
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 <[email protected]>
Suggested-by: Florian Fainelli <[email protected]>
Fixes: 5b191dcba719 ("mmc: sdhci-brcmstb: Fix mmc timeout errors on S5 suspend")
Cc: [email protected]
Tested-By: Nicolas Schichan <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>
Acked-by: Florian Fainelli <[email protected]>
Signed-off-by: Ulf Hansson <[email protected]>
-rw-r--r-- | drivers/mmc/host/sdhci-pltfm.h | 7 |
1 files changed, 6 insertions, 1 deletions
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 */ |