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

Clark, Rob rob at ti.com
Wed Jun 6 14:24:02 UTC 2012


On Wed, Jun 6, 2012 at 5:36 PM, Adnan Ali <adnan.ali at codethink.co.uk> 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 at codethink.co.uk>
> ---
>  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
>



More information about the devel mailing list