summaryrefslogtreecommitdiff
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-12-15 10:04:23 +0100
commit7529d2baf9d2a16fb108f9d6b4e4f0dab0ba08d3 (patch)
tree9fd5897b31beba82101aae014c74ab0591add901
parent4a71b442b5772cd1a238183f27442222b3aa43e7 (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;