Skip to content

Commit 5846efa

Browse files
rddunlapstorulf
authored andcommitted
mmc: sdhci-esdhc-imx: fix defined but not used warnings
Fix warnings when CONFIG_PM=y and CONFIG_PM_SLEEP is not set by surrounding the 2 functions with #ifdef CONFIG_PM_SLEEP. drivers/mmc/host/sdhci-esdhc-imx.c:1659:13: warning: 'sdhc_esdhc_tuning_restore' defined but not used [-Wunused-function] 1659 | static void sdhc_esdhc_tuning_restore(struct sdhci_host *host) drivers/mmc/host/sdhci-esdhc-imx.c:1637:13: warning: 'sdhc_esdhc_tuning_save' defined but not used [-Wunused-function] 1637 | static void sdhc_esdhc_tuning_save(struct sdhci_host *host) Fixes: 3d1eea4 ("mmc: sdhci-esdhc-imx: Save tuning value when card stays powered in suspend") Signed-off-by: Randy Dunlap <[email protected]> Reviewed-by: Haibo Chen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent 1dfc7d1 commit 5846efa

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/mmc/host/sdhci-esdhc-imx.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1634,6 +1634,7 @@ static void sdhci_esdhc_imx_hwinit(struct sdhci_host *host)
16341634
}
16351635
}
16361636

1637+
#ifdef CONFIG_PM_SLEEP
16371638
static void sdhc_esdhc_tuning_save(struct sdhci_host *host)
16381639
{
16391640
struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
@@ -1688,6 +1689,7 @@ static void sdhc_esdhc_tuning_restore(struct sdhci_host *host)
16881689
host->ioaddr + ESDHC_TUNE_CTRL_STATUS);
16891690
}
16901691
}
1692+
#endif
16911693

16921694
static void esdhc_cqe_enable(struct mmc_host *mmc)
16931695
{

0 commit comments

Comments
 (0)