kernel: update kernel 4.4 to version 4.4.110
[librecmc/librecmc.git] / target / linux / ipq806x / patches-4.4 / 015-8-qcom-tsens-8916-mark-PM-functions-__maybe_unused.patch
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
5
6 The newly added tsens-8916 driver produces warnings when CONFIG_PM
7 is disabled:
8
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)
11             ^~~~~~~~~~~~
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)
14             ^~~~~~~~~~~~~
15
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.
19
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>
23 ---
24  drivers/thermal/qcom/tsens.c | 4 ++--
25  1 file changed, 2 insertions(+), 2 deletions(-)
26
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
30         return -ENOTSUPP;
31  }
32  
33 -static int tsens_suspend(struct device *dev)
34 +static int  __maybe_unused tsens_suspend(struct device *dev)
35  {
36         struct tsens_device *tmdev = dev_get_drvdata(dev);
37  
38 @@ -50,7 +50,7 @@ static int tsens_suspend(struct device *
39         return 0;
40  }
41  
42 -static int tsens_resume(struct device *dev)
43 +static int __maybe_unused tsens_resume(struct device *dev)
44  {
45         struct tsens_device *tmdev = dev_get_drvdata(dev);
46