From: Arnd Bergmann <arnd@kernel.org>
To: Chaotian Jing <chaotian.jing@mediatek.com>,
Ulf Hansson <ulf.hansson@linaro.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
Wenbin Mei <wenbin.mei@mediatek.com>
Cc: Marek Vasut <marex@denx.de>, Arnd Bergmann <arnd@arndb.de>,
Chun-Hung Wu <chun-hung.wu@mediatek.com>,
linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
yong mao <yong.mao@mediatek.com>,
Amey Narkhede <ameynarkhede03@gmail.com>,
linux-mediatek@lists.infradead.org,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH] mmc: mediatek: mark PM functions as __maybe_unused
Date: Thu, 3 Dec 2020 23:29:16 +0100 [thread overview]
Message-ID: <20201203222922.1067522-1-arnd@kernel.org> (raw)
From: Arnd Bergmann <arnd@arndb.de>
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: c0a2074ac575 ("mmc: mediatek: Fix system suspend/resume support for CQHCI")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/mmc/host/mtk-sd.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
index d057fb11112a..de09c6347524 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
@@ -2683,7 +2683,6 @@ static int msdc_drv_remove(struct platform_device *pdev)
return 0;
}
-#ifdef CONFIG_PM
static void msdc_save_reg(struct msdc_host *host)
{
u32 tune_reg = host->dev_comp->pad_tune_reg;
@@ -2742,7 +2741,7 @@ static void msdc_restore_reg(struct msdc_host *host)
__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 msdc_host *host = mmc_priv(mmc);
@@ -2752,7 +2751,7 @@ static int msdc_runtime_suspend(struct device *dev)
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 msdc_host *host = mmc_priv(mmc);
@@ -2762,7 +2761,7 @@ static int msdc_runtime_resume(struct device *dev)
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);
int ret;
@@ -2776,11 +2775,10 @@ static int msdc_suspend(struct device *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);
}
-#endif
static const struct dev_pm_ops msdc_dev_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(msdc_suspend, msdc_resume)
--
2.27.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2020-12-03 22:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-03 22:29 Arnd Bergmann [this message]
2020-12-04 10:02 ` [PATCH] mmc: mediatek: mark PM functions as __maybe_unused Ulf Hansson
2020-12-04 14:14 ` Arnd Bergmann
2020-12-04 14:38 ` Ulf Hansson
2020-12-04 14:55 ` Arnd Bergmann
2020-12-04 18:04 ` Paul Cercueil
2020-12-07 12:33 ` Paul Cercueil
2020-12-08 14:04 ` Arnd Bergmann
2020-12-08 15:38 ` Paul Cercueil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201203222922.1067522-1-arnd@kernel.org \
--to=arnd@kernel.org \
--cc=ameynarkhede03@gmail.com \
--cc=arnd@arndb.de \
--cc=chaotian.jing@mediatek.com \
--cc=chun-hung.wu@mediatek.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-mmc@vger.kernel.org \
--cc=marex@denx.de \
--cc=matthias.bgg@gmail.com \
--cc=ulf.hansson@linaro.org \
--cc=wenbin.mei@mediatek.com \
--cc=yong.mao@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).