From: Arnd Bergmann Date: Wed, 29 Jun 2016 14:26:34 +0000 (-0300) Subject: [media] s5p_cec: mark suspend/resume as __maybe_unused X-Git-Tag: v4.8-rc1~152^2~117 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=aee8937089b1;p=karo-tx-linux.git [media] s5p_cec: mark suspend/resume as __maybe_unused The suspend/resume functions in the s5p-cec driver are only referenced when CONFIG_PM is enabled, so we get a warning about unused functions otherwise: drivers/staging/media/s5p-cec/s5p_cec.c:260:12: error: 's5p_cec_resume' defined but not used [-Werror=unused-function] static int s5p_cec_resume(struct device *dev) ^~~~~~~~~~~~~~ drivers/staging/media/s5p-cec/s5p_cec.c:253:12: error: 's5p_cec_suspend' defined but not used [-Werror=unused-function] static int s5p_cec_suspend(struct device *dev) This marks them as __maybe_unused to avoid the warning without having to introduce an extra #ifdef. Signed-off-by: Arnd Bergmann Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/staging/media/s5p-cec/s5p_cec.c b/drivers/staging/media/s5p-cec/s5p_cec.c index f90b7c4e48fe..78333273c4e5 100644 --- a/drivers/staging/media/s5p-cec/s5p_cec.c +++ b/drivers/staging/media/s5p-cec/s5p_cec.c @@ -250,14 +250,14 @@ static int s5p_cec_runtime_resume(struct device *dev) return 0; } -static int s5p_cec_suspend(struct device *dev) +static int __maybe_unused s5p_cec_suspend(struct device *dev) { if (pm_runtime_suspended(dev)) return 0; return s5p_cec_runtime_suspend(dev); } -static int s5p_cec_resume(struct device *dev) +static int __maybe_unused s5p_cec_resume(struct device *dev) { if (pm_runtime_suspended(dev)) return 0;