Skip to content

Commit f85a15c

Browse files
tmlindstorulf
authored andcommitted
mmc: sdhci-omap: Fix build if CONFIG_PM_SLEEP is not set
Commit f433e8a ("mmc: sdhci-omap: Implement PM runtime functions") combined the use of runtime PM and system suspend functions but left the ifdef CONFIG_PM_SLEEP in place causing undeclared identifier error for sdhci_omap_runtime_suspend if CONFIG_PM_SLEEP is not enabled. Let's fix the error by removing ifdef CONFIG_PM_SLEEP and tagging the reset of the PM related functions with __maybe_unused. Let's also remove the forward declaration for sdhci_omap_context_save(), that was accidentally left from an earlier version and is no longer used. Reported-by: kernel test robot <[email protected]> Signed-off-by: Tony Lindgren <[email protected]> [Ulf: Rebased and fixed build error] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent b3e202f commit f85a15c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/mmc/host/sdhci-omap.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1415,8 +1415,9 @@ static int sdhci_omap_remove(struct platform_device *pdev)
14151415

14161416
return 0;
14171417
}
1418-
#ifdef CONFIG_PM_SLEEP
1419-
static void sdhci_omap_context_save(struct sdhci_omap_host *omap_host)
1418+
1419+
#ifdef CONFIG_PM
1420+
static void __maybe_unused sdhci_omap_context_save(struct sdhci_omap_host *omap_host)
14201421
{
14211422
omap_host->con = sdhci_omap_readl(omap_host, SDHCI_OMAP_CON);
14221423
omap_host->hctl = sdhci_omap_readl(omap_host, SDHCI_OMAP_HCTL);
@@ -1427,7 +1428,7 @@ static void sdhci_omap_context_save(struct sdhci_omap_host *omap_host)
14271428
}
14281429

14291430
/* Order matters here, HCTL must be restored in two phases */
1430-
static void sdhci_omap_context_restore(struct sdhci_omap_host *omap_host)
1431+
static void __maybe_unused sdhci_omap_context_restore(struct sdhci_omap_host *omap_host)
14311432
{
14321433
sdhci_omap_writel(omap_host, SDHCI_OMAP_HCTL, omap_host->hctl);
14331434
sdhci_omap_writel(omap_host, SDHCI_OMAP_CAPA, omap_host->capa);

0 commit comments

Comments
 (0)