mirror of
https://github.com/torvalds/linux.git
synced 2024-12-26 04:42:12 +00:00
mmc: mediatek: mark PM functions as __maybe_unused
The #ifdef check for the suspend/resume functions is wrong:
drivers/mmc/host/mtk-sd.c:2765:12: error: unused function 'msdc_suspend' [-Werror,-Wunused-function]
static int msdc_suspend(struct device *dev)
drivers/mmc/host/mtk-sd.c:2779:12: error: unused function 'msdc_resume' [-Werror,-Wunused-function]
static int msdc_resume(struct device *dev)
Remove the #ifdef and mark all four as __maybe_unused to aovid the
problem.
Fixes: c0a2074ac5
("mmc: mediatek: Fix system suspend/resume support for CQHCI")
Cc: stable@vger.kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20201203222922.1067522-1-arnd@kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
parent
6246d7c9d1
commit
c0d638a03b
@ -2604,7 +2604,6 @@ static int msdc_drv_remove(struct platform_device *pdev)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_PM
|
|
||||||
static void msdc_save_reg(struct msdc_host *host)
|
static void msdc_save_reg(struct msdc_host *host)
|
||||||
{
|
{
|
||||||
u32 tune_reg = host->dev_comp->pad_tune_reg;
|
u32 tune_reg = host->dev_comp->pad_tune_reg;
|
||||||
@ -2663,7 +2662,7 @@ static void msdc_restore_reg(struct msdc_host *host)
|
|||||||
__msdc_enable_sdio_irq(host, 1);
|
__msdc_enable_sdio_irq(host, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int msdc_runtime_suspend(struct device *dev)
|
static int __maybe_unused msdc_runtime_suspend(struct device *dev)
|
||||||
{
|
{
|
||||||
struct mmc_host *mmc = dev_get_drvdata(dev);
|
struct mmc_host *mmc = dev_get_drvdata(dev);
|
||||||
struct msdc_host *host = mmc_priv(mmc);
|
struct msdc_host *host = mmc_priv(mmc);
|
||||||
@ -2673,7 +2672,7 @@ static int msdc_runtime_suspend(struct device *dev)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int msdc_runtime_resume(struct device *dev)
|
static int __maybe_unused msdc_runtime_resume(struct device *dev)
|
||||||
{
|
{
|
||||||
struct mmc_host *mmc = dev_get_drvdata(dev);
|
struct mmc_host *mmc = dev_get_drvdata(dev);
|
||||||
struct msdc_host *host = mmc_priv(mmc);
|
struct msdc_host *host = mmc_priv(mmc);
|
||||||
@ -2683,7 +2682,7 @@ static int msdc_runtime_resume(struct device *dev)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int msdc_suspend(struct device *dev)
|
static int __maybe_unused msdc_suspend(struct device *dev)
|
||||||
{
|
{
|
||||||
struct mmc_host *mmc = dev_get_drvdata(dev);
|
struct mmc_host *mmc = dev_get_drvdata(dev);
|
||||||
int ret;
|
int ret;
|
||||||
@ -2697,11 +2696,10 @@ static int msdc_suspend(struct device *dev)
|
|||||||
return pm_runtime_force_suspend(dev);
|
return pm_runtime_force_suspend(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int msdc_resume(struct device *dev)
|
static int __maybe_unused msdc_resume(struct device *dev)
|
||||||
{
|
{
|
||||||
return pm_runtime_force_resume(dev);
|
return pm_runtime_force_resume(dev);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
static const struct dev_pm_ops msdc_dev_pm_ops = {
|
static const struct dev_pm_ops msdc_dev_pm_ops = {
|
||||||
SET_SYSTEM_SLEEP_PM_OPS(msdc_suspend, msdc_resume)
|
SET_SYSTEM_SLEEP_PM_OPS(msdc_suspend, msdc_resume)
|
||||||
|
Loading…
Reference in New Issue
Block a user