aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2017-01-20 17:25:15 +0100
committerJonathan Cameron <jic23@kernel.org>2017-01-21 12:34:54 +0000
commitd1242acc566a9288cbca441be1a7358c0316197e (patch)
tree1416cdd40c56947729314942fbea7b6e0d523991 /drivers/iio
parentiio: pressure: ms5611: claim direct mode during oversampling changes (diff)
downloadlinux-dev-d1242acc566a9288cbca441be1a7358c0316197e.tar.xz
linux-dev-d1242acc566a9288cbca441be1a7358c0316197e.zip
iio: light: cm3605: mark PM functions as __maybe_unused
When CONFIG_PM_SLEEP is disabled, we get a harmless warning drivers/iio/light/cm3605.c:292:12: error: 'cm3605_pm_resume' defined but not used [-Werror=unused-function] drivers/iio/light/cm3605.c:281:12: error: 'cm3605_pm_suspend' defined but not used [-Werror=unused-function] Marking the functions as possibly unused avoids the warning without needing to add an #ifdef. Fixes: 8afa505c1230 ("iio: light: add driver for Capella CM3605") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/light/cm3605.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iio/light/cm3605.c b/drivers/iio/light/cm3605.c
index 2d96543db1ef..980624e9ffb5 100644
--- a/drivers/iio/light/cm3605.c
+++ b/drivers/iio/light/cm3605.c
@@ -278,7 +278,7 @@ static int cm3605_remove(struct platform_device *pdev)
return 0;
}
-static int cm3605_pm_suspend(struct device *dev)
+static int __maybe_unused cm3605_pm_suspend(struct device *dev)
{
struct iio_dev *indio_dev = dev_get_drvdata(dev);
struct cm3605 *cm3605 = iio_priv(indio_dev);
@@ -289,7 +289,7 @@ static int cm3605_pm_suspend(struct device *dev)
return 0;
}
-static int cm3605_pm_resume(struct device *dev)
+static int __maybe_unused cm3605_pm_resume(struct device *dev)
{
struct iio_dev *indio_dev = dev_get_drvdata(dev);
struct cm3605 *cm3605 = iio_priv(indio_dev);