Skip to content

Commit

Permalink
[media] atmel-isi: Protect PM-only functions to kill warning
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Josh Wu <[email protected]>
Signed-off-by: Guennadi Liakhovetski <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
geertu authored and mchehab committed Sep 25, 2015
1 parent f00ae75 commit 18baba6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/media/platform/soc_camera/atmel-isi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1040,6 +1040,7 @@ static int atmel_isi_probe(struct platform_device *pdev)
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);
Expand All @@ -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,
Expand Down

0 comments on commit 18baba6

Please sign in to comment.