]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
mmc: sdhci-esdhc-imx: fix defined but not used warnings
authorRandy Dunlap <rdunlap@infradead.org>
Thu, 24 Apr 2025 03:46:10 +0000 (20:46 -0700)
committerUlf Hansson <ulf.hansson@linaro.org>
Wed, 14 May 2025 15:07:48 +0000 (17:07 +0200)
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: 3d1eea493894 ("mmc: sdhci-esdhc-imx: Save tuning value when card stays powered in suspend")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reviewed-by: Haibo Chen <haibo.chen@nxp.com>
Link: https://lore.kernel.org/r/20250424034610.441532-1-rdunlap@infradead.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-esdhc-imx.c

index b977d37e26840e39bf1630b6a5790c28606fdd81..c0160c69a027826c4099c9bcf82cd4d83f1113fd 100644 (file)
@@ -1634,6 +1634,7 @@ static void sdhci_esdhc_imx_hwinit(struct sdhci_host *host)
        }
 }
 
+#ifdef CONFIG_PM_SLEEP
 static void sdhc_esdhc_tuning_save(struct sdhci_host *host)
 {
        struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
@@ -1688,6 +1689,7 @@ static void sdhc_esdhc_tuning_restore(struct sdhci_host *host)
                       host->ioaddr + ESDHC_TUNE_CTRL_STATUS);
        }
 }
+#endif
 
 static void esdhc_cqe_enable(struct mmc_host *mmc)
 {