aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2016-07-04 09:12:28 -0400
committerZhang Rui <rui.zhang@intel.com>2016-09-27 02:02:16 -0400
commit5b97469a55872a30a0d53a1279a8ae8b1c68b52c (patch)
treebd4db74c0a3e223dfa3743bfdeb58bd5d7e3dca0
parent43528445f6db0e934592a0c58b5a71d6be51aa41 (diff)
thermal: qcom: tsens-8916: mark PM functions __maybe_unused
The newly added tsens-8916 driver produces warnings when CONFIG_PM is disabled: drivers/thermal/qcom/tsens.c:53:12: error: 'tsens_resume' defined but not used [-Werror=unused-function] static int tsens_resume(struct device *dev) ^~~~~~~~~~~~ drivers/thermal/qcom/tsens.c:43:12: error: 'tsens_suspend' defined but not used [-Werror=unused-function] static int tsens_suspend(struct device *dev) ^~~~~~~~~~~~~ This marks both functions __maybe_unused to let the compiler know that they might be used in other configurations, without adding ugly #ifdef logic. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Rajendra Nayak <rnayak@codeaurora.org> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
-rw-r--r--drivers/thermal/qcom/tsens.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c
index 446f70b5dbb2..3f9fe6aa51cc 100644
--- a/drivers/thermal/qcom/tsens.c
+++ b/drivers/thermal/qcom/tsens.c
@@ -40,7 +40,7 @@ static int tsens_get_trend(void *p, int trip, enum thermal_trend *trend)
40 return -ENOTSUPP; 40 return -ENOTSUPP;
41} 41}
42 42
43static int tsens_suspend(struct device *dev) 43static int __maybe_unused tsens_suspend(struct device *dev)
44{ 44{
45 struct tsens_device *tmdev = dev_get_drvdata(dev); 45 struct tsens_device *tmdev = dev_get_drvdata(dev);
46 46
@@ -50,7 +50,7 @@ static int tsens_suspend(struct device *dev)
50 return 0; 50 return 0;
51} 51}
52 52
53static int tsens_resume(struct device *dev) 53static int __maybe_unused tsens_resume(struct device *dev)
54{ 54{
55 struct tsens_device *tmdev = dev_get_drvdata(dev); 55 struct tsens_device *tmdev = dev_get_drvdata(dev);
56 56