From 365ad643912e5a101210b6dfaa4db3be6a4be202 Mon Sep 17 00:00:00 2001 From: Laurent Coustet Date: Mon, 14 Jan 2013 21:46:15 +0000 Subject: [PATCH] Fix S5P-MFC compilation when PM is disabled. --- drivers/media/video/s5p-mfc/s5p_mfc_pm.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/media/video/s5p-mfc/s5p_mfc_pm.c b/drivers/media/video/s5p-mfc/s5p_mfc_pm.c index 5e894cfd68979b..88aabbc6799ba3 100755 --- a/drivers/media/video/s5p-mfc/s5p_mfc_pm.c +++ b/drivers/media/video/s5p-mfc/s5p_mfc_pm.c @@ -101,7 +101,9 @@ void s5p_mfc_final_pm(struct s5p_mfc_dev *dev) int s5p_mfc_clock_on(void) { int ret; +#ifdef CONFIG_PM_RUNTIME struct s5p_mfc_dev *dev = platform_get_drvdata(to_platform_device(pm->device)); +#endif atomic_inc(&clk_ref); @@ -110,23 +112,28 @@ int s5p_mfc_clock_on(void) #endif ret = clk_enable(pm->clock); +#ifdef CONFIG_PM_RUNTIME if (atomic_read(&clk_ref) == 1) s5p_mfc_mem_resume(dev->alloc_ctx[0]); - +#endif return ret; } void s5p_mfc_clock_off(void) { +#ifdef CONFIG_PM_RUNTIME struct s5p_mfc_dev *dev = platform_get_drvdata(to_platform_device(pm->device)); +#endif atomic_dec(&clk_ref); #ifdef CLK_DEBUG mfc_debug(3, "- %d", atomic_read(&clk_ref)); #endif +#ifdef CONFIG_PM_RUNTIME if (atomic_read(&clk_ref) == 0) s5p_mfc_mem_suspend(dev->alloc_ctx[0]); +#endif clk_disable(pm->clock); }