1 From 5b97469a55872a30a0d53a1279a8ae8b1c68b52c Mon Sep 17 00:00:00 2001
2 From: Arnd Bergmann <arnd@arndb.de>
3 Date: Mon, 4 Jul 2016 15:12:28 +0200
4 Subject: thermal: qcom: tsens-8916: mark PM functions __maybe_unused
6 The newly added tsens-8916 driver produces warnings when CONFIG_PM
9 drivers/thermal/qcom/tsens.c:53:12: error: 'tsens_resume' defined but not used [-Werror=unused-function]
10 static int tsens_resume(struct device *dev)
12 drivers/thermal/qcom/tsens.c:43:12: error: 'tsens_suspend' defined but not used [-Werror=unused-function]
13 static int tsens_suspend(struct device *dev)
16 This marks both functions __maybe_unused to let the compiler
17 know that they might be used in other configurations, without
18 adding ugly #ifdef logic.
20 Signed-off-by: Arnd Bergmann <arnd@arndb.de>
21 Reviewed-by: Rajendra Nayak <rnayak@codeaurora.org>
22 Signed-off-by: Zhang Rui <rui.zhang@intel.com>
24 drivers/thermal/qcom/tsens.c | 4 ++--
25 1 file changed, 2 insertions(+), 2 deletions(-)
27 --- a/drivers/thermal/qcom/tsens.c
28 +++ b/drivers/thermal/qcom/tsens.c
29 @@ -40,7 +40,7 @@ static int tsens_get_trend(void *data, l
33 -static int tsens_suspend(struct device *dev)
34 +static int __maybe_unused tsens_suspend(struct device *dev)
36 struct tsens_device *tmdev = dev_get_drvdata(dev);
38 @@ -50,7 +50,7 @@ static int tsens_suspend(struct device *
42 -static int tsens_resume(struct device *dev)
43 +static int __maybe_unused tsens_resume(struct device *dev)
45 struct tsens_device *tmdev = dev_get_drvdata(dev);