Skip to content

Commit de3767a

Browse files
thierryredingmchehab
authored andcommitted
[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>
1 parent 098bcd2 commit de3767a

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎drivers/media/platform/s5p-jpeg/jpeg-core.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2632,6 +2632,7 @@ static int s5p_jpeg_remove(struct platform_device *pdev)
26322632
return 0;
26332633
}
26342634

2635+
#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP)
26352636
static int s5p_jpeg_runtime_suspend(struct device *dev)
26362637
{
26372638
struct s5p_jpeg *jpeg = dev_get_drvdata(dev);
@@ -2681,7 +2682,9 @@ static int s5p_jpeg_runtime_resume(struct device *dev)
26812682

26822683
return 0;
26832684
}
2685+
#endif /* CONFIG_PM_RUNTIME || CONFIG_PM_SLEEP */
26842686

2687+
#ifdef CONFIG_PM_SLEEP
26852688
static int s5p_jpeg_suspend(struct device *dev)
26862689
{
26872690
if (pm_runtime_suspended(dev))
@@ -2697,6 +2700,7 @@ static int s5p_jpeg_resume(struct device *dev)
26972700

26982701
return s5p_jpeg_runtime_resume(dev);
26992702
}
2703+
#endif
27002704

27012705
static const struct dev_pm_ops s5p_jpeg_pm_ops = {
27022706
SET_SYSTEM_SLEEP_PM_OPS(s5p_jpeg_suspend, s5p_jpeg_resume)

0 commit comments

Comments
 (0)