Re: [PATCH] Staging: omapdrm: omap_drv: fix missing power management config

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 6, 2012 at 5:36 PM, Adnan Ali <adnan.ali@xxxxxxxxxxxxxxx> wrote:
> This commit fixes issue that include power managment
> config(CONFIG_PM) missing in driver. Consistency
> is the key.
>
> Signed-off-by: Adnan Ali <adnan.ali@xxxxxxxxxxxxxxx>
> ---
>  drivers/staging/omapdrm/omap_drv.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/staging/omapdrm/omap_drv.c b/drivers/staging/omapdrm/omap_drv.c
> index 4beab94..92ed302 100644
> --- a/drivers/staging/omapdrm/omap_drv.c
> +++ b/drivers/staging/omapdrm/omap_drv.c
> @@ -792,7 +792,7 @@ static int pdev_suspend(struct platform_device *pDevice, pm_message_t state)
>        DBG("");
>        return 0;
>  }
> -
> +#ifdef CONFIG_PM
>  static int pdev_resume(struct platform_device *device)
>  {
>        DBG("");
> @@ -803,6 +803,7 @@ static void pdev_shutdown(struct platform_device *device)
>  {
>        DBG("");
>  }
> +#endif
>
>  static int pdev_probe(struct platform_device *device)
>  {
> @@ -826,8 +827,10 @@ struct platform_driver pdev = {
>                },
>                .probe = pdev_probe,
>                .remove = pdev_remove,
> +#ifdef CONFIG_PM
>                .suspend = pdev_suspend,
>                .resume = pdev_resume,
> +#endif
>                .shutdown = pdev_shutdown,


I guess the #endif should be after the .shutdown rather than before...

but suspend/resume/shutdown fxn ptrs are not inside an #ifdef
CONFIG_PM in platform_device.h so I'm a bit unsure of the need for
adding additional #ifdef's in the driver code.

BR,
-R

>  };
>
> --
> 1.7.4.1
>
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux