Skip to content

Commit

Permalink
[media] s5p-jpeg: Only build suspend/resume for PM
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Thierry Reding authored and Mauro Carvalho Chehab committed Oct 24, 2014
1 parent 098bcd2 commit de3767a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/media/platform/s5p-jpeg/jpeg-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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))
Expand All @@ -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)
Expand Down

0 comments on commit de3767a

Please sign in to comment.