mfd: exynos-lpass: Mark PM functions as __maybe_unused

The newly added exynos lpass driver produces a build warning when
CONFIG_PM is disabled since the only callers of exynos_lpass_disable
are under an #ifdef:

drivers/mfd/exynos-lpass.c:93:13: error: 'exynos_lpass_disable' defined but not used [-Werror=unused-function]
 static void exynos_lpass_disable(struct exynos_lpass *lpass)

This removes the #ifdef and replaces it with __maybe_unused annotations
so the compiler can leave out the unused code silently with less
room for mistakes.

Fixes: 36c26760bba8 ("mfd: Add Samsung Exynos Low Power Audio Subsystem driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
This commit is contained in:
Arnd Bergmann 2016-09-06 15:24:00 +02:00 committed by Lee Jones
parent c50cdd62dd
commit 22a96b85ea
1 changed files with 2 additions and 4 deletions

View File

@ -144,8 +144,7 @@ static int exynos_lpass_probe(struct platform_device *pdev)
return of_platform_populate(dev->of_node, NULL, NULL, dev); return of_platform_populate(dev->of_node, NULL, NULL, dev);
} }
#ifdef CONFIG_PM_SLEEP static int __maybe_unused exynos_lpass_suspend(struct device *dev)
static int exynos_lpass_suspend(struct device *dev)
{ {
struct exynos_lpass *lpass = dev_get_drvdata(dev); struct exynos_lpass *lpass = dev_get_drvdata(dev);
@ -154,7 +153,7 @@ static int exynos_lpass_suspend(struct device *dev)
return 0; return 0;
} }
static int exynos_lpass_resume(struct device *dev) static int __maybe_unused exynos_lpass_resume(struct device *dev)
{ {
struct exynos_lpass *lpass = dev_get_drvdata(dev); struct exynos_lpass *lpass = dev_get_drvdata(dev);
@ -162,7 +161,6 @@ static int exynos_lpass_resume(struct device *dev)
return 0; return 0;
} }
#endif
static SIMPLE_DEV_PM_OPS(lpass_pm_ops, exynos_lpass_suspend, static SIMPLE_DEV_PM_OPS(lpass_pm_ops, exynos_lpass_suspend,
exynos_lpass_resume); exynos_lpass_resume);