Commit b3571400 authored by Dmitry Torokhov's avatar Dmitry Torokhov

Input: st1232 - switch to using SIMPLE_DEV_PM_OPS

Acked-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
Reviewed-by: default avatarSimon Horman <horms@verge.net.au>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent e6293d2f
...@@ -218,7 +218,7 @@ static int __devexit st1232_ts_remove(struct i2c_client *client) ...@@ -218,7 +218,7 @@ static int __devexit st1232_ts_remove(struct i2c_client *client)
return 0; return 0;
} }
#ifdef CONFIG_PM #ifdef CONFIG_PM_SLEEP
static int st1232_ts_suspend(struct device *dev) static int st1232_ts_suspend(struct device *dev)
{ {
struct i2c_client *client = to_i2c_client(dev); struct i2c_client *client = to_i2c_client(dev);
...@@ -243,12 +243,11 @@ static int st1232_ts_resume(struct device *dev) ...@@ -243,12 +243,11 @@ static int st1232_ts_resume(struct device *dev)
return 0; return 0;
} }
static const struct dev_pm_ops st1232_ts_pm_ops = {
.suspend = st1232_ts_suspend,
.resume = st1232_ts_resume,
};
#endif #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[] = { static const struct i2c_device_id st1232_ts_id[] = {
{ ST1232_TS_NAME, 0 }, { ST1232_TS_NAME, 0 },
{ } { }
...@@ -271,9 +270,7 @@ static struct i2c_driver st1232_ts_driver = { ...@@ -271,9 +270,7 @@ static struct i2c_driver st1232_ts_driver = {
.name = ST1232_TS_NAME, .name = ST1232_TS_NAME,
.owner = THIS_MODULE, .owner = THIS_MODULE,
.of_match_table = of_match_ptr(st1232_ts_dt_ids), .of_match_table = of_match_ptr(st1232_ts_dt_ids),
#ifdef CONFIG_PM
.pm = &st1232_ts_pm_ops, .pm = &st1232_ts_pm_ops,
#endif
}, },
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment