diff options
author | Arnd Bergmann <arnd@arndb.de> | 2016-09-06 09:24:00 -0400 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2016-10-04 10:48:04 -0400 |
commit | 22a96b85eabd05a77bd1388d041d96ccc8f86459 (patch) | |
tree | 50c1cdcbc515489613e63418a6dcbfe4bf8b1567 | |
parent | c50cdd62dda3f885c1e6ca8b3d5a0851c911ec54 (diff) |
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>
-rw-r--r-- | drivers/mfd/exynos-lpass.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/mfd/exynos-lpass.c b/drivers/mfd/exynos-lpass.c index 578ac7b57b96..2e064fb8826f 100644 --- a/drivers/mfd/exynos-lpass.c +++ b/drivers/mfd/exynos-lpass.c | |||
@@ -144,8 +144,7 @@ static int exynos_lpass_probe(struct platform_device *pdev) | |||
144 | return of_platform_populate(dev->of_node, NULL, NULL, dev); | 144 | return of_platform_populate(dev->of_node, NULL, NULL, dev); |
145 | } | 145 | } |
146 | 146 | ||
147 | #ifdef CONFIG_PM_SLEEP | 147 | static int __maybe_unused exynos_lpass_suspend(struct device *dev) |
148 | static int exynos_lpass_suspend(struct device *dev) | ||
149 | { | 148 | { |
150 | struct exynos_lpass *lpass = dev_get_drvdata(dev); | 149 | struct exynos_lpass *lpass = dev_get_drvdata(dev); |
151 | 150 | ||
@@ -154,7 +153,7 @@ static int exynos_lpass_suspend(struct device *dev) | |||
154 | return 0; | 153 | return 0; |
155 | } | 154 | } |
156 | 155 | ||
157 | static int exynos_lpass_resume(struct device *dev) | 156 | static int __maybe_unused exynos_lpass_resume(struct device *dev) |
158 | { | 157 | { |
159 | struct exynos_lpass *lpass = dev_get_drvdata(dev); | 158 | struct exynos_lpass *lpass = dev_get_drvdata(dev); |
160 | 159 | ||
@@ -162,7 +161,6 @@ static int exynos_lpass_resume(struct device *dev) | |||
162 | 161 | ||
163 | return 0; | 162 | return 0; |
164 | } | 163 | } |
165 | #endif | ||
166 | 164 | ||
167 | static SIMPLE_DEV_PM_OPS(lpass_pm_ops, exynos_lpass_suspend, | 165 | static SIMPLE_DEV_PM_OPS(lpass_pm_ops, exynos_lpass_suspend, |
168 | exynos_lpass_resume); | 166 | exynos_lpass_resume); |