Skip to contentSkip to conversation

s5p-fimc: Only build suspend/resume for PM

PATCH New Thierry Reding 1 participant 1 message Oct 14, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 s5p-fimc: Only build suspend/resume for PM

From: Thierry Reding <[email protected]>

If power management is disabled these functions become unused, so there is no reason to build them. This fixes a couple of build warnings when PM(_SLEEP,_RUNTIME) is not enabled.

---
Changes in v2:
- add #endif comment for readability

 drivers/media/platform/exynos4-is/fimc-core.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/media/platform/exynos4-is/fimc-core.c +2 -0
index b70fd996d794..aee92d908e49 100644
@@ -832,6 +832,7 @@ err:
 	return -ENXIO;
 }
 
+#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP)
 static int fimc_m2m_suspend(struct fimc_dev *fimc)
 {
 	unsigned long flags;
@@ -870,6 +871,7 @@ static int fimc_m2m_resume(struct fimc_dev *fimc)
 
 	return 0;
 }
+#endif /* CONFIG_PM_RUNTIME || CONFIG_PM_SLEEP */
 
 static const struct of_device_id fimc_of_match[];
 
Signature · 1 line
2.1.2