[media] atmel-isi: Protect PM-only functions to kill warning
authorGeert Uytterhoeven <geert@linux-m68k.org>
Sun, 6 Sep 2015 10:08:49 +0000 (07:08 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Fri, 25 Sep 2015 20:33:21 +0000 (17:33 -0300)
If CONFIG_PM=n:

    drivers/media/platform/soc_camera/atmel-isi.c:1044: warning: 'atmel_isi_runtime_suspend' defined but not used
    drivers/media/platform/soc_camera/atmel-isi.c:1054: warning: 'atmel_isi_runtime_resume' defined but not used

Protect the unused functions by #ifdef CONFIG_PM to fix this.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Josh Wu <josh.wu@atmel.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/platform/soc_camera/atmel-isi.c

index 90701726a06a2e5c4bcea8a9f011333d7ae1651c..ccf30ccbe389233f41d7dd2c616807aa9d8cd3bf 100644 (file)
@@ -1040,6 +1040,7 @@ err_alloc_ctx:
        return ret;
 }
 
+#ifdef CONFIG_PM
 static int atmel_isi_runtime_suspend(struct device *dev)
 {
        struct soc_camera_host *soc_host = to_soc_camera_host(dev);
@@ -1058,6 +1059,7 @@ static int atmel_isi_runtime_resume(struct device *dev)
 
        return clk_prepare_enable(isi->pclk);
 }
+#endif /* CONFIG_PM */
 
 static const struct dev_pm_ops atmel_isi_dev_pm_ops = {
        SET_RUNTIME_PM_OPS(atmel_isi_runtime_suspend,