Re: [PATCH] Input: st1232 - switch to using SIMPLE_DEV_PM_OPS

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

 



On Saturday, March 31, 2012, Dmitry Torokhov wrote:
> Signed-off-by: Dmitry Torokhov <dtor@xxxxxxx>

Looks good.

Acked-by: Rafael J. Wysocki <rjw@xxxxxxx>

> ---
> 
> Just compiled, not tested...
> 
>  drivers/input/touchscreen/st1232.c |   11 ++++-------
>  1 files changed, 4 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/input/touchscreen/st1232.c b/drivers/input/touchscreen/st1232.c
> index e22e27e..a9be39f 100644
> --- a/drivers/input/touchscreen/st1232.c
> +++ b/drivers/input/touchscreen/st1232.c
> @@ -218,7 +218,7 @@ static int __devexit st1232_ts_remove(struct i2c_client *client)
>  	return 0;
>  }
>  
> -#ifdef CONFIG_PM
> +#ifdef CONFIG_PM_SLEEP
>  static int st1232_ts_suspend(struct device *dev)
>  {
>  	struct i2c_client *client = to_i2c_client(dev);
> @@ -243,12 +243,11 @@ static int st1232_ts_resume(struct device *dev)
>  	return 0;
>  }
>  
> -static const struct dev_pm_ops st1232_ts_pm_ops = {
> -	.suspend	= st1232_ts_suspend,
> -	.resume		= st1232_ts_resume,
> -};
>  #endif
>  
> +static SIMPLE_DEV_PM_OPS(st1232_ts_pm_ops,
> +			 st1232_ts_suspend, st1232_ts_resume);
> +
>  static const struct i2c_device_id st1232_ts_id[] = {
>  	{ ST1232_TS_NAME, 0 },
>  	{ }
> @@ -269,9 +268,7 @@ static struct i2c_driver st1232_ts_driver = {
>  		.name	= ST1232_TS_NAME,
>  		.owner	= THIS_MODULE,
>  		.of_match_table = st1232_ts_dt_ids,
> -#ifdef CONFIG_PM
>  		.pm	= &st1232_ts_pm_ops,
> -#endif
>  	},
>  };
>  
> 

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


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux