]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
iio: light: cm3605: mark PM functions as __maybe_unused
authorArnd Bergmann <arnd@arndb.de>
Fri, 20 Jan 2017 16:25:15 +0000 (17:25 +0100)
committerJonathan Cameron <jic23@kernel.org>
Sat, 21 Jan 2017 12:34:54 +0000 (12:34 +0000)
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>
drivers/iio/light/cm3605.c

index 2d96543db1ef87969415717314bf0122b9b9d750..980624e9ffb511b6b4f3a350a059f0f1afad6c99 100644 (file)
@@ -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);