Input: cy8ctmg110_ts - Convert to dev_pm_ops
There is a general move towards the use of dev_pm_ops rather than bus specific suspend APIs as this simplifies both the bus and PM core implementations. Convert the cy8ctmg110_ts driver over. Compile tested only. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This commit is contained in:
parent
d72e64ec0b
commit
93f38e9141
1 changed files with 9 additions and 6 deletions
|
@ -280,8 +280,9 @@ err_free_mem:
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM
|
||||||
static int cy8ctmg110_suspend(struct i2c_client *client, pm_message_t mesg)
|
static int cy8ctmg110_suspend(struct device *dev)
|
||||||
{
|
{
|
||||||
|
struct i2c_client *client = to_i2c_client(dev);
|
||||||
struct cy8ctmg110 *ts = i2c_get_clientdata(client);
|
struct cy8ctmg110 *ts = i2c_get_clientdata(client);
|
||||||
|
|
||||||
if (device_may_wakeup(&client->dev))
|
if (device_may_wakeup(&client->dev))
|
||||||
|
@ -293,8 +294,9 @@ static int cy8ctmg110_suspend(struct i2c_client *client, pm_message_t mesg)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int cy8ctmg110_resume(struct i2c_client *client)
|
static int cy8ctmg110_resume(struct device *dev)
|
||||||
{
|
{
|
||||||
|
struct i2c_client *client = to_i2c_client(dev);
|
||||||
struct cy8ctmg110 *ts = i2c_get_clientdata(client);
|
struct cy8ctmg110 *ts = i2c_get_clientdata(client);
|
||||||
|
|
||||||
if (device_may_wakeup(&client->dev))
|
if (device_may_wakeup(&client->dev))
|
||||||
|
@ -305,6 +307,8 @@ static int cy8ctmg110_resume(struct i2c_client *client)
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static SIMPLE_DEV_PM_OPS(cy8ctmg110_pm, cy8ctmg110_suspend, cy8ctmg110_resume);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int __devexit cy8ctmg110_remove(struct i2c_client *client)
|
static int __devexit cy8ctmg110_remove(struct i2c_client *client)
|
||||||
|
@ -335,14 +339,13 @@ static struct i2c_driver cy8ctmg110_driver = {
|
||||||
.driver = {
|
.driver = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.name = CY8CTMG110_DRIVER_NAME,
|
.name = CY8CTMG110_DRIVER_NAME,
|
||||||
|
#ifdef CONFIG_PM
|
||||||
|
.pm = &cy8ctmg110_pm,
|
||||||
|
#endif
|
||||||
},
|
},
|
||||||
.id_table = cy8ctmg110_idtable,
|
.id_table = cy8ctmg110_idtable,
|
||||||
.probe = cy8ctmg110_probe,
|
.probe = cy8ctmg110_probe,
|
||||||
.remove = __devexit_p(cy8ctmg110_remove),
|
.remove = __devexit_p(cy8ctmg110_remove),
|
||||||
#ifdef CONFIG_PM
|
|
||||||
.suspend = cy8ctmg110_suspend,
|
|
||||||
.resume = cy8ctmg110_resume,
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init cy8ctmg110_init(void)
|
static int __init cy8ctmg110_init(void)
|
||||||
|
|
Loading…
Add table
Reference in a new issue