diff options
author | dissent1 <be.dissent+github@gmail.com> | 2016-11-05 16:15:33 +0300 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2016-12-01 15:47:43 +0100 |
commit | fef6a96d9e9e001a28b6a673c56ed79029457b5d (patch) | |
tree | 808f89926a7a7a2b3b29564e2070592ef983d948 /target/linux/ipq806x/patches-4.4/015-8-qcom-tsens-8916-mark-PM-functions-__maybe_unused.patch | |
parent | 2b71f958b1d2022bd0c4dcaa458f5ba1b955f934 (diff) | |
download | upstream-fef6a96d9e9e001a28b6a673c56ed79029457b5d.tar.gz upstream-fef6a96d9e9e001a28b6a673c56ed79029457b5d.tar.bz2 upstream-fef6a96d9e9e001a28b6a673c56ed79029457b5d.zip |
ipq806x: add thermal sensor driver
Allows to check cpu temperature.
Huge thanks to @hnyman for valuable assistance!
Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
Diffstat (limited to 'target/linux/ipq806x/patches-4.4/015-8-qcom-tsens-8916-mark-PM-functions-__maybe_unused.patch')
-rw-r--r-- | target/linux/ipq806x/patches-4.4/015-8-qcom-tsens-8916-mark-PM-functions-__maybe_unused.patch | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/target/linux/ipq806x/patches-4.4/015-8-qcom-tsens-8916-mark-PM-functions-__maybe_unused.patch b/target/linux/ipq806x/patches-4.4/015-8-qcom-tsens-8916-mark-PM-functions-__maybe_unused.patch new file mode 100644 index 0000000000..39d2173fe9 --- /dev/null +++ b/target/linux/ipq806x/patches-4.4/015-8-qcom-tsens-8916-mark-PM-functions-__maybe_unused.patch @@ -0,0 +1,46 @@ +From 5b97469a55872a30a0d53a1279a8ae8b1c68b52c Mon Sep 17 00:00:00 2001 +From: Arnd Bergmann <arnd@arndb.de> +Date: Mon, 4 Jul 2016 15:12:28 +0200 +Subject: 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> +--- + drivers/thermal/qcom/tsens.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/thermal/qcom/tsens.c ++++ b/drivers/thermal/qcom/tsens.c +@@ -40,7 +40,7 @@ static int tsens_get_trend(void *data, l + return -ENOTSUPP; + } + +-static int tsens_suspend(struct device *dev) ++static int __maybe_unused tsens_suspend(struct device *dev) + { + struct tsens_device *tmdev = dev_get_drvdata(dev); + +@@ -50,7 +50,7 @@ static int tsens_suspend(struct device * + return 0; + } + +-static int tsens_resume(struct device *dev) ++static int __maybe_unused tsens_resume(struct device *dev) + { + struct tsens_device *tmdev = dev_get_drvdata(dev); + |