From: Arnd Bergmann Date: Mon, 4 Jul 2016 13:12:28 +0000 (+0200) Subject: thermal: qcom: tsens-8916: mark PM functions __maybe_unused X-Git-Tag: v4.9-rc1~36^2~18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5b97469a55872a30a0d53a1279a8ae8b1c68b52c;p=platform%2Fkernel%2Flinux-exynos.git 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 Reviewed-by: Rajendra Nayak Signed-off-by: Zhang Rui --- diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c index 446f70b..3f9fe6a 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) 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 *dev) 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);