提交 45ee5046 编写于 作者: A Arnd Bergmann 提交者: Ulf Hansson

mmc: sunxi: mark PM functions as __maybe_unused

The newly added runtime-pm functions cause a harmless warning
when CONFIG_PM is disabled:

drivers/mmc/host/sunxi-mmc.c:1452:12: error: 'sunxi_mmc_runtime_suspend' defined but not used [-Werror=unused-function]
 static int sunxi_mmc_runtime_suspend(struct device *dev)
            ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/mmc/host/sunxi-mmc.c:1435:12: error: 'sunxi_mmc_runtime_resume' defined but not used [-Werror=unused-function]
 static int sunxi_mmc_runtime_resume(struct device *dev)

This marks them as __maybe_unused to shut up the warning.

Fixes: 9a8e1e8c ("mmc: sunxi: Add runtime_pm support")
Signed-off-by: NArnd Bergmann <arnd@arndb.de>
Acked-by: NMaxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
上级 833b5117
...@@ -1432,7 +1432,7 @@ static int sunxi_mmc_remove(struct platform_device *pdev) ...@@ -1432,7 +1432,7 @@ static int sunxi_mmc_remove(struct platform_device *pdev)
return 0; return 0;
} }
static int sunxi_mmc_runtime_resume(struct device *dev) static int __maybe_unused sunxi_mmc_runtime_resume(struct device *dev)
{ {
struct mmc_host *mmc = dev_get_drvdata(dev); struct mmc_host *mmc = dev_get_drvdata(dev);
struct sunxi_mmc_host *host = mmc_priv(mmc); struct sunxi_mmc_host *host = mmc_priv(mmc);
...@@ -1449,7 +1449,7 @@ static int sunxi_mmc_runtime_resume(struct device *dev) ...@@ -1449,7 +1449,7 @@ static int sunxi_mmc_runtime_resume(struct device *dev)
return 0; return 0;
} }
static int sunxi_mmc_runtime_suspend(struct device *dev) static int __maybe_unused sunxi_mmc_runtime_suspend(struct device *dev)
{ {
struct mmc_host *mmc = dev_get_drvdata(dev); struct mmc_host *mmc = dev_get_drvdata(dev);
struct sunxi_mmc_host *host = mmc_priv(mmc); struct sunxi_mmc_host *host = mmc_priv(mmc);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册