aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDudley Du <dudley.dulixin@gmail.com>2014-12-03 18:29:34 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2014-12-03 18:39:14 -0500
commitf68a95cda6a483110e391ac2b8dd2092502c09fe (patch)
treebc0fcad290eea849bf3dbdf3cdd206a783ac8809
parentf2d347ff70be453e861304448cb2f32ff94d40e9 (diff)
Input: cyapa - fix resuming the device
Chage b1cfa7b4388285c0f0b486f152ab0cb18612c779 tried to get away form using irq in cyapa structure and use client->irq instead, but missed a couple of spots making the touchpad inoperative after resume. Reported-by: Jeremiah Mahler <jmmahler@gmail.com> Signed-off-by: Dudley Du <dudley.dulixin@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-rw-r--r--drivers/input/mouse/cyapa.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/input/mouse/cyapa.c b/drivers/input/mouse/cyapa.c
index c84a9ebeb2ff..94e73275af04 100644
--- a/drivers/input/mouse/cyapa.c
+++ b/drivers/input/mouse/cyapa.c
@@ -206,7 +206,6 @@ struct cyapa {
206 struct i2c_client *client; 206 struct i2c_client *client;
207 struct input_dev *input; 207 struct input_dev *input;
208 char phys[32]; /* device physical location */ 208 char phys[32]; /* device physical location */
209 int irq;
210 bool irq_wake; /* irq wake is enabled */ 209 bool irq_wake; /* irq wake is enabled */
211 bool smbus; 210 bool smbus;
212 211
@@ -938,7 +937,7 @@ static int __maybe_unused cyapa_suspend(struct device *dev)
938 power_mode, error); 937 power_mode, error);
939 938
940 if (device_may_wakeup(dev)) 939 if (device_may_wakeup(dev))
941 cyapa->irq_wake = (enable_irq_wake(cyapa->irq) == 0); 940 cyapa->irq_wake = (enable_irq_wake(client->irq) == 0);
942 941
943 mutex_unlock(&input->mutex); 942 mutex_unlock(&input->mutex);
944 943
@@ -956,7 +955,7 @@ static int __maybe_unused cyapa_resume(struct device *dev)
956 mutex_lock(&input->mutex); 955 mutex_lock(&input->mutex);
957 956
958 if (device_may_wakeup(dev) && cyapa->irq_wake) 957 if (device_may_wakeup(dev) && cyapa->irq_wake)
959 disable_irq_wake(cyapa->irq); 958 disable_irq_wake(client->irq);
960 959
961 power_mode = input->users ? PWR_MODE_FULL_ACTIVE : PWR_MODE_OFF; 960 power_mode = input->users ? PWR_MODE_FULL_ACTIVE : PWR_MODE_OFF;
962 error = cyapa_set_power_mode(cyapa, PWR_MODE_FULL_ACTIVE); 961 error = cyapa_set_power_mode(cyapa, PWR_MODE_FULL_ACTIVE);
@@ -964,7 +963,7 @@ static int __maybe_unused cyapa_resume(struct device *dev)
964 dev_warn(dev, "resume: set power mode to %d failed: %d\n", 963 dev_warn(dev, "resume: set power mode to %d failed: %d\n",
965 power_mode, error); 964 power_mode, error);
966 965
967 enable_irq(cyapa->irq); 966 enable_irq(client->irq);
968 967
969 mutex_unlock(&input->mutex); 968 mutex_unlock(&input->mutex);
970 969