提交 d1242acc 编写于 作者: A Arnd Bergmann 提交者: Jonathan Cameron

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: 8afa505c ("iio: light: add driver for Capella CM3605")
Signed-off-by: NArnd Bergmann <arnd@arndb.de>
Signed-off-by: NJonathan Cameron <jic23@kernel.org>
上级 3bc1abcd
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册