Skip to content

Commit c0d638a

Browse files
arndbstorulf
authored andcommitted
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: c0a2074 ("mmc: mediatek: Fix system suspend/resume support for CQHCI") Cc: [email protected] Signed-off-by: Arnd Bergmann <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent 6246d7c commit c0d638a

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

drivers/mmc/host/mtk-sd.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2604,7 +2604,6 @@ static int msdc_drv_remove(struct platform_device *pdev)
26042604
return 0;
26052605
}
26062606

2607-
#ifdef CONFIG_PM
26082607
static void msdc_save_reg(struct msdc_host *host)
26092608
{
26102609
u32 tune_reg = host->dev_comp->pad_tune_reg;
@@ -2663,7 +2662,7 @@ static void msdc_restore_reg(struct msdc_host *host)
26632662
__msdc_enable_sdio_irq(host, 1);
26642663
}
26652664

2666-
static int msdc_runtime_suspend(struct device *dev)
2665+
static int __maybe_unused msdc_runtime_suspend(struct device *dev)
26672666
{
26682667
struct mmc_host *mmc = dev_get_drvdata(dev);
26692668
struct msdc_host *host = mmc_priv(mmc);
@@ -2673,7 +2672,7 @@ static int msdc_runtime_suspend(struct device *dev)
26732672
return 0;
26742673
}
26752674

2676-
static int msdc_runtime_resume(struct device *dev)
2675+
static int __maybe_unused msdc_runtime_resume(struct device *dev)
26772676
{
26782677
struct mmc_host *mmc = dev_get_drvdata(dev);
26792678
struct msdc_host *host = mmc_priv(mmc);
@@ -2683,7 +2682,7 @@ static int msdc_runtime_resume(struct device *dev)
26832682
return 0;
26842683
}
26852684

2686-
static int msdc_suspend(struct device *dev)
2685+
static int __maybe_unused msdc_suspend(struct device *dev)
26872686
{
26882687
struct mmc_host *mmc = dev_get_drvdata(dev);
26892688
int ret;
@@ -2697,11 +2696,10 @@ static int msdc_suspend(struct device *dev)
26972696
return pm_runtime_force_suspend(dev);
26982697
}
26992698

2700-
static int msdc_resume(struct device *dev)
2699+
static int __maybe_unused msdc_resume(struct device *dev)
27012700
{
27022701
return pm_runtime_force_resume(dev);
27032702
}
2704-
#endif
27052703

27062704
static const struct dev_pm_ops msdc_dev_pm_ops = {
27072705
SET_SYSTEM_SLEEP_PM_OPS(msdc_suspend, msdc_resume)

0 commit comments

Comments
 (0)