summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2014-01-27 10:17:08 +0100
committerMax Krummenacher <max.krummenacher@toradex.com>2016-06-28 11:05:32 +0200
commit537684b6ccb249ee9afa81a57b0e0d30348f7b13 (patch)
treeedfd945f2b9bfbb6741421a88ad6b9ad0be7783c
parentb0c045aef6b33205bffc1489a2887a88eae8809e (diff)
input: touchscreen: fusion: use new I2C PM functions
To avoid warnings use the new I2C power management function for suspend and resume. (cherry picked from commit 9d996316a470d37fb71c521f27106b014f3f0b23)
-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;