[media] atmel-isc: mark PM functions as __maybe_unused
authorArnd Bergmann <arnd@arndb.de>
Mon, 12 Sep 2016 15:32:58 +0000 (12:32 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Mon, 19 Sep 2016 19:25:33 +0000 (16:25 -0300)
The newly added atmel-isc driver uses SET_RUNTIME_PM_OPS() to
refer to its suspend/resume functions, causing a warning when
CONFIG_PM is not set:

media/platform/atmel/atmel-isc.c:1477:12: error: 'isc_runtime_resume' defined but not used [-Werror=unused-function]
media/platform/atmel/atmel-isc.c:1467:12: error: 'isc_runtime_suspend' defined but not used [-Werror=unused-function]

This adds __maybe_unused annotations to avoid the warning without
adding an error-prone #ifdef around it.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/atmel/atmel-isc.c

index ed8050d6ea717f6ccff2c96c1adc43e45f3771c4..ccfe13b7d3f819b9f36880f5dbd461be9e76a878 100644 (file)
@@ -1470,7 +1470,7 @@ static int atmel_isc_remove(struct platform_device *pdev)
        return 0;
 }
 
-static int isc_runtime_suspend(struct device *dev)
+static int __maybe_unused isc_runtime_suspend(struct device *dev)
 {
        struct isc_device *isc = dev_get_drvdata(dev);
 
@@ -1480,7 +1480,7 @@ static int isc_runtime_suspend(struct device *dev)
        return 0;
 }
 
-static int isc_runtime_resume(struct device *dev)
+static int __maybe_unused isc_runtime_resume(struct device *dev)
 {
        struct isc_device *isc = dev_get_drvdata(dev);
        int ret;