Linux Samsung SOC development
 help / color / mirror / Atom feed
From: Andrzej Hajda <a.hajda@samsung.com>
To: Thierry Reding <thierry.reding@gmail.com>,
	Inki Dae <inki.dae@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>,
	linux-samsung-soc@vger.kernel.org,
	Seung-Woo Kim <sw0312.kim@samsung.com>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 2/3] drm/exynos: fimc: Clock control is unused if !PM
Date: Fri, 25 Sep 2015 10:41:32 +0200	[thread overview]
Message-ID: <560508BC.4070602@samsung.com> (raw)
In-Reply-To: <1443089655-15352-2-git-send-email-thierry.reding@gmail.com>

On 09/24/2015 12:14 PM, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
> 
> Protect the fimc_clk_ctrl() function with an #ifdef CONFIG_PM guard to
> avoid "defined but not used" warnings.
> 
> Signed-off-by: Thierry Reding <treding@nvidia.com>

Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>

Regards
Andrzej

> ---
>  drivers/gpu/drm/exynos/exynos_drm_fimc.c | 36 ++++++++++++++++----------------
>  1 file changed, 18 insertions(+), 18 deletions(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimc.c b/drivers/gpu/drm/exynos/exynos_drm_fimc.c
> index 2a652359af64..dd3a5e6d58c8 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_fimc.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_fimc.c
> @@ -1206,23 +1206,6 @@ static struct exynos_drm_ipp_ops fimc_dst_ops = {
>  	.set_addr = fimc_dst_set_addr,
>  };
>  
> -static int fimc_clk_ctrl(struct fimc_context *ctx, bool enable)
> -{
> -	DRM_DEBUG_KMS("enable[%d]\n", enable);
> -
> -	if (enable) {
> -		clk_prepare_enable(ctx->clocks[FIMC_CLK_GATE]);
> -		clk_prepare_enable(ctx->clocks[FIMC_CLK_WB_A]);
> -		ctx->suspended = false;
> -	} else {
> -		clk_disable_unprepare(ctx->clocks[FIMC_CLK_GATE]);
> -		clk_disable_unprepare(ctx->clocks[FIMC_CLK_WB_A]);
> -		ctx->suspended = true;
> -	}
> -
> -	return 0;
> -}
> -
>  static irqreturn_t fimc_irq_handler(int irq, void *dev_id)
>  {
>  	struct fimc_context *ctx = dev_id;
> @@ -1780,6 +1763,24 @@ static int fimc_remove(struct platform_device *pdev)
>  	return 0;
>  }
>  
> +#ifdef CONFIG_PM
> +static int fimc_clk_ctrl(struct fimc_context *ctx, bool enable)
> +{
> +	DRM_DEBUG_KMS("enable[%d]\n", enable);
> +
> +	if (enable) {
> +		clk_prepare_enable(ctx->clocks[FIMC_CLK_GATE]);
> +		clk_prepare_enable(ctx->clocks[FIMC_CLK_WB_A]);
> +		ctx->suspended = false;
> +	} else {
> +		clk_disable_unprepare(ctx->clocks[FIMC_CLK_GATE]);
> +		clk_disable_unprepare(ctx->clocks[FIMC_CLK_WB_A]);
> +		ctx->suspended = true;
> +	}
> +
> +	return 0;
> +}
> +
>  #ifdef CONFIG_PM_SLEEP
>  static int fimc_suspend(struct device *dev)
>  {
> @@ -1806,7 +1807,6 @@ static int fimc_resume(struct device *dev)
>  }
>  #endif
>  
> -#ifdef CONFIG_PM
>  static int fimc_runtime_suspend(struct device *dev)
>  {
>  	struct fimc_context *ctx = get_fimc_context(dev);
> 

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2015-09-25  8:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-24 10:14 [PATCH 1/3] drm/exynos: Suspend/resume is unused if !PM Thierry Reding
2015-09-24 10:14 ` [PATCH 2/3] drm/exynos: fimc: Clock control " Thierry Reding
2015-09-25  8:41   ` Andrzej Hajda [this message]
2015-09-24 10:14 ` [PATCH 3/3] drm/exynos: rotator: " Thierry Reding
2015-09-25  8:41   ` Andrzej Hajda
2015-09-25  8:47 ` [PATCH 1/3] drm/exynos: Suspend/resume " Andrzej Hajda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=560508BC.4070602@samsung.com \
    --to=a.hajda@samsung.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=inki.dae@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=sw0312.kim@samsung.com \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox