s5p-jpeg: Only build suspend/resume for PM
PATCH v2 1/1 s5p-jpeg: Only build suspend/resume for PM
From: Thierry Reding <[email protected]>
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.
Signed-off-by Thierry Reding <[email protected]>
---
Changes in v2:
- add #endif comment for readability
--- drivers/media/platform/s5p-jpeg/jpeg-core.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/media/platform/s5p-jpeg/jpeg-core.c +4 -0
@@ -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)
Signature · 1 line
2.1.2