diff mbox

exynos4-is: Compile runtime PM callbacks in conditionally

Message ID 1389132528-21281-1-git-send-email-s.nawrocki@samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Sylwester Nawrocki Jan. 7, 2014, 10:08 p.m. UTC
Enclose the runtime PM helpers in #ifdef CONFIG_PM_RUNTIME/#endif
to avoid following compile warning when CONFIG_PM_RUNTIME is disabled:

 CC      drivers/media/platform/exynos4-is/fimc-core.o
drivers/media/platform/exynos4-is/fimc-core.c:1040:12: warning: ‘fimc_runtime_resume’ defined but not used
drivers/media/platform/exynos4-is/fimc-core.c:1057:12: warning: ‘fimc_runtime_suspend’ defined but not used

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
---
 drivers/media/platform/exynos4-is/fimc-core.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

--
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Jingoo Han Jan. 8, 2014, 4:22 a.m. UTC | #1
On Wednesday, January 08, 2014 7:09 AM, Sylwester Nawrocki wrote:
> 
> Enclose the runtime PM helpers in #ifdef CONFIG_PM_RUNTIME/#endif
> to avoid following compile warning when CONFIG_PM_RUNTIME is disabled:
> 
>  CC      drivers/media/platform/exynos4-is/fimc-core.o
> drivers/media/platform/exynos4-is/fimc-core.c:1040:12: warning: ‘fimc_runtime_resume’ defined but not
> used
> drivers/media/platform/exynos4-is/fimc-core.c:1057:12: warning: ‘fimc_runtime_suspend’ defined but not
> used
> 
> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>

Right, '#ifdef CONFIG_PM_RUNTIME' should be used in order to
fix the compile warning.

Reviewed-by: Jingoo Han <jg1.han@samsung.com>

Best regards,
Jingoo Han

> ---
>  drivers/media/platform/exynos4-is/fimc-core.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/media/platform/exynos4-is/fimc-core.c b/drivers/media/platform/exynos4-is/fimc-
> core.c
> index dcbea59..da2fc86 100644
> --- a/drivers/media/platform/exynos4-is/fimc-core.c
> +++ b/drivers/media/platform/exynos4-is/fimc-core.c
> @@ -1037,6 +1037,7 @@ err_sclk:
>  	return ret;
>  }
> 
> +#ifdef CONFIG_PM_RUNTIME
>  static int fimc_runtime_resume(struct device *dev)
>  {
>  	struct fimc_dev *fimc =	dev_get_drvdata(dev);
> @@ -1069,6 +1070,7 @@ static int fimc_runtime_suspend(struct device *dev)
>  	dbg("fimc%d: state: 0x%lx", fimc->id, fimc->state);
>  	return ret;
>  }
> +#endif
> 
>  #ifdef CONFIG_PM_SLEEP
>  static int fimc_resume(struct device *dev)
> --
> 1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/media/platform/exynos4-is/fimc-core.c b/drivers/media/platform/exynos4-is/fimc-core.c
index dcbea59..da2fc86 100644
--- a/drivers/media/platform/exynos4-is/fimc-core.c
+++ b/drivers/media/platform/exynos4-is/fimc-core.c
@@ -1037,6 +1037,7 @@  err_sclk:
 	return ret;
 }

+#ifdef CONFIG_PM_RUNTIME
 static int fimc_runtime_resume(struct device *dev)
 {
 	struct fimc_dev *fimc =	dev_get_drvdata(dev);
@@ -1069,6 +1070,7 @@  static int fimc_runtime_suspend(struct device *dev)
 	dbg("fimc%d: state: 0x%lx", fimc->id, fimc->state);
 	return ret;
 }
+#endif

 #ifdef CONFIG_PM_SLEEP
 static int fimc_resume(struct device *dev)