summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2014-01-27 10:17:08 +0100
committerStefan Agner <stefan.agner@toradex.com>2014-01-27 14:30:24 +0100
commit11e6551e5d639560c0c7b28de0a4fc91e05b6a07 (patch)
treee89e0ef371c6cc0bba9ce68b2b1a77a3d509bd9b /drivers
parent5b64bbd1134938891b848604abd75dfe2a345f50 (diff)
input: touchscreen: fusion: use new I2C PM functions
To avoid warnings use the new I2C power management function for suspend and resume.
Diffstat (limited to 'drivers')
-rw-r--r--drivers/input/touchscreen/fusion_F0710A.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/input/touchscreen/fusion_F0710A.c b/drivers/input/touchscreen/fusion_F0710A.c
index 75c7011a36e3..c9713ff1a0a1 100644
--- a/drivers/input/touchscreen/fusion_F0710A.c
+++ b/drivers/input/touchscreen/fusion_F0710A.c
@@ -414,17 +414,19 @@ static int fusion_F0710A_probe(struct i2c_client *i2c, const struct i2c_device_i
return ret;
}
-#ifdef CONFIG_PM
-static int fusion_F0710A_suspend(struct i2c_client *i2c, pm_message_t mesg)
+#ifdef CONFIG_PM_SLEEP
+static int fusion_F0710A_suspend(struct device *dev)
{
+ struct i2c_client *i2c = to_i2c_client(dev);
disable_irq(i2c->irq);
flush_workqueue(fusion_F0710A.workq);
return 0;
}
-static int fusion_F0710A_resume(struct i2c_client *i2c)
+static int fusion_F0710A_resume(struct device *dev)
{
+ struct i2c_client *i2c = to_i2c_client(dev);
enable_irq(i2c->irq);
return 0;
@@ -452,21 +454,22 @@ static struct i2c_device_id fusion_F0710A_id[] = {
{},
};
+static const struct dev_pm_ops fusion_F0710A_pm_ops = {
+ SET_SYSTEM_SLEEP_PM_OPS(fusion_F0710A_suspend, fusion_F0710A_resume)
+};
+
static struct i2c_driver fusion_F0710A_i2c_drv = {
.driver = {
+ .owner = THIS_MODULE,
.name = DRV_NAME,
+ .pm = &fusion_F0710A_pm_ops,
},
.probe = fusion_F0710A_probe,
.remove = fusion_F0710A_remove,
-#ifdef CONFIG_PM
- .suspend = fusion_F0710A_suspend,
- .resume = fusion_F0710A_resume,
-#endif
.id_table = fusion_F0710A_id,
.address_list = normal_i2c,
};
-
static int __init fusion_F0710A_init( void )
{
int ret;