Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Input: st-keyscan - fix 'defined but not used' compiler warnings

Add #ifdef CONFIG_PM_SLEEP around keyscan_supend() and keyscan_resume() to
fix the following compiler warnings occuring if CONFIG_PM_SLEEP is unset:

+ /scratch/kisskb/src/drivers/input/keyboard/st-keyscan.c: warning: 'keyscan_resume' defined but not used [-Wunused-function]: => 235:12
+ /scratch/kisskb/src/drivers/input/keyboard/st-keyscan.c: warning: 'keyscan_suspend' defined but not used [-Wunused-function]: => 218:12

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Link: https://lkml.org/lkml/2014/7/8/109
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Tobias Klauser and committed by
Dmitry Torokhov
2e58cdcc e76aed9d

+2
+2
drivers/input/keyboard/st-keyscan.c
··· 215 215 return 0; 216 216 } 217 217 218 + #ifdef CONFIG_PM_SLEEP 218 219 static int keyscan_suspend(struct device *dev) 219 220 { 220 221 struct platform_device *pdev = to_platform_device(dev); ··· 250 249 mutex_unlock(&input->mutex); 251 250 return retval; 252 251 } 252 + #endif 253 253 254 254 static SIMPLE_DEV_PM_OPS(keyscan_dev_pm_ops, keyscan_suspend, keyscan_resume); 255 255