提交 6809a5f7 编写于 作者: A Arnd Bergmann 提交者: Ulf Hansson

mmc: sdhci-msm: avoid unused function warning

The newly added sdhci_msm_restore_sdr_dll_config() function is only called
if CONFIG_PM is enabled:

drivers/mmc/host/sdhci-msm.c:1050:12: error:
'sdhci_msm_restore_sdr_dll_config' defined but not used
[-Werror=unused-function]

Better remove the incorrect #ifdef altogether and just use __maybe_unused,
which is harder to get wrong.
Signed-off-by: NArnd Bergmann <arnd@arndb.de>
Acked-by: NAdrian Hunter <adrian.hunter@intel.com>
Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
上级 0e6e7c2f
...@@ -1997,8 +1997,7 @@ static int sdhci_msm_remove(struct platform_device *pdev) ...@@ -1997,8 +1997,7 @@ static int sdhci_msm_remove(struct platform_device *pdev)
return 0; return 0;
} }
#ifdef CONFIG_PM static __maybe_unused int sdhci_msm_runtime_suspend(struct device *dev)
static int sdhci_msm_runtime_suspend(struct device *dev)
{ {
struct sdhci_host *host = dev_get_drvdata(dev); struct sdhci_host *host = dev_get_drvdata(dev);
struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
...@@ -2010,7 +2009,7 @@ static int sdhci_msm_runtime_suspend(struct device *dev) ...@@ -2010,7 +2009,7 @@ static int sdhci_msm_runtime_suspend(struct device *dev)
return 0; return 0;
} }
static int sdhci_msm_runtime_resume(struct device *dev) static __maybe_unused int sdhci_msm_runtime_resume(struct device *dev)
{ {
struct sdhci_host *host = dev_get_drvdata(dev); struct sdhci_host *host = dev_get_drvdata(dev);
struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
...@@ -2030,7 +2029,6 @@ static int sdhci_msm_runtime_resume(struct device *dev) ...@@ -2030,7 +2029,6 @@ static int sdhci_msm_runtime_resume(struct device *dev)
return 0; return 0;
} }
#endif
static const struct dev_pm_ops sdhci_msm_pm_ops = { static const struct dev_pm_ops sdhci_msm_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册