[PATCH] drm/atmel-hlcdc: Compile suspend/resume for PM_SLEEP only

Boris Brezillon boris.brezillon at free-electrons.com
Tue Aug 18 01:53:58 PDT 2015


On Fri, 14 Aug 2015 13:58:20 +0200
Thierry Reding <thierry.reding at gmail.com> wrote:

> From: Thierry Reding <treding at nvidia.com>
> 
> If PM is enabled but PM_SLEEP is disabled, the suspend/resume functions
> are still unused and produce a compiler warning.
> 
> Signed-off-by: Thierry Reding <treding at nvidia.com>

I'm adding

Cc: <stable at vger.kernel.org> # 4.1+

while applying this commit to my fixes branch.

> ---
>  drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
> index b6bc5cb9b9ee..303ae68f983d 100644
> --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
> +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
> @@ -561,7 +561,7 @@ static int atmel_hlcdc_dc_drm_remove(struct platform_device *pdev)
>  	return 0;
>  }
>  
> -#ifdef CONFIG_PM
> +#ifdef CONFIG_PM_SLEEP
>  static int atmel_hlcdc_dc_drm_suspend(struct device *dev)
>  {
>  	struct drm_device *drm_dev = dev_get_drvdata(dev);



-- 
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com


More information about the dri-devel mailing list