summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2014-10-14 14:10:40 +0400
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-10-24 15:36:20 +0400
commitde3767aaef5ced67d0037623655bd1acb24c7cc1 (patch)
treee64643b8dddfd1099f83b3b0f335c4a760f706a3 /drivers/media
parent098bcd2335f0824e76dd835e4e2b7ae8e38fc281 (diff)
downloadlinux-de3767aaef5ced67d0037623655bd1acb24c7cc1.tar.xz
[media] s5p-jpeg: Only build suspend/resume for PM
If power management is disabled these function become unused, so there is no reason to build them. This fixes a couple of build warnings when PM(_SLEEP,_RUNTIME) is not enabled. Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/platform/s5p-jpeg/jpeg-core.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/platform/s5p-jpeg/jpeg-core.c b/drivers/media/platform/s5p-jpeg/jpeg-core.c
index e525a7c8d885..ec7339e84b57 100644
--- a/drivers/media/platform/s5p-jpeg/jpeg-core.c
+++ b/drivers/media/platform/s5p-jpeg/jpeg-core.c
@@ -2632,6 +2632,7 @@ static int s5p_jpeg_remove(struct platform_device *pdev)
return 0;
}
+#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP)
static int s5p_jpeg_runtime_suspend(struct device *dev)
{
struct s5p_jpeg *jpeg = dev_get_drvdata(dev);
@@ -2681,7 +2682,9 @@ static int s5p_jpeg_runtime_resume(struct device *dev)
return 0;
}
+#endif /* CONFIG_PM_RUNTIME || CONFIG_PM_SLEEP */
+#ifdef CONFIG_PM_SLEEP
static int s5p_jpeg_suspend(struct device *dev)
{
if (pm_runtime_suspended(dev))
@@ -2697,6 +2700,7 @@ static int s5p_jpeg_resume(struct device *dev)
return s5p_jpeg_runtime_resume(dev);
}
+#endif
static const struct dev_pm_ops s5p_jpeg_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(s5p_jpeg_suspend, s5p_jpeg_resume)