From: Geert Uytterhoeven Date: Wed, 18 Feb 2015 11:39:46 +0000 (+0100) Subject: iio: common: ssp_sensors: Protect PM-only functions to kill warning X-Git-Tag: v4.14-rc1~5810^2~3^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b841118ee6c0917004e7e763c4f6bf8eb10a6d93;p=platform%2Fkernel%2Flinux-rpi.git iio: common: ssp_sensors: Protect PM-only functions to kill warning If CONFIG_PM_SLEEP=n: drivers/iio/common/ssp_sensors/ssp_dev.c:644: warning: ‘ssp_suspend’ defined but not used drivers/iio/common/ssp_sensors/ssp_dev.c:669: warning: ‘ssp_resume’ defined but not used Protect the unused functions by #ifdef CONFIG_PM_SLEEP to fix this. Signed-off-by: Geert Uytterhoeven Acked-by: Karol Wrona Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/common/ssp_sensors/ssp_dev.c b/drivers/iio/common/ssp_sensors/ssp_dev.c index 52d7043..55a90082 100644 --- a/drivers/iio/common/ssp_sensors/ssp_dev.c +++ b/drivers/iio/common/ssp_sensors/ssp_dev.c @@ -640,6 +640,7 @@ static int ssp_remove(struct spi_device *spi) return 0; } +#ifdef CONFIG_PM_SLEEP static int ssp_suspend(struct device *dev) { int ret; @@ -688,6 +689,7 @@ static int ssp_resume(struct device *dev) return 0; } +#endif /* CONFIG_PM_SLEEP */ static const struct dev_pm_ops ssp_pm_ops = { SET_SYSTEM_SLEEP_PM_OPS(ssp_suspend, ssp_resume)