summaryrefslogtreecommitdiff
path: root/drivers/input
diff options
context:
space:
mode:
authorDudley Du <dudley.dulixin@gmail.com>2014-12-03 23:29:34 (GMT)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2014-12-03 23:39:14 (GMT)
commitf68a95cda6a483110e391ac2b8dd2092502c09fe (patch)
treebc0fcad290eea849bf3dbdf3cdd206a783ac8809 /drivers/input
parentf2d347ff70be453e861304448cb2f32ff94d40e9 (diff)
downloadlinux-f68a95cda6a483110e391ac2b8dd2092502c09fe.tar.xz
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>
Diffstat (limited to 'drivers/input')
-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 c84a9eb..94e7327 100644
--- a/drivers/input/mouse/cyapa.c
+++ b/drivers/input/mouse/cyapa.c
@@ -206,7 +206,6 @@ struct cyapa {
struct i2c_client *client;
struct input_dev *input;
char phys[32]; /* device physical location */
- int irq;
bool irq_wake; /* irq wake is enabled */
bool smbus;
@@ -938,7 +937,7 @@ static int __maybe_unused cyapa_suspend(struct device *dev)
power_mode, error);
if (device_may_wakeup(dev))
- cyapa->irq_wake = (enable_irq_wake(cyapa->irq) == 0);
+ cyapa->irq_wake = (enable_irq_wake(client->irq) == 0);
mutex_unlock(&input->mutex);
@@ -956,7 +955,7 @@ static int __maybe_unused cyapa_resume(struct device *dev)
mutex_lock(&input->mutex);
if (device_may_wakeup(dev) && cyapa->irq_wake)
- disable_irq_wake(cyapa->irq);
+ disable_irq_wake(client->irq);
power_mode = input->users ? PWR_MODE_FULL_ACTIVE : PWR_MODE_OFF;
error = cyapa_set_power_mode(cyapa, PWR_MODE_FULL_ACTIVE);
@@ -964,7 +963,7 @@ static int __maybe_unused cyapa_resume(struct device *dev)
dev_warn(dev, "resume: set power mode to %d failed: %d\n",
power_mode, error);
- enable_irq(cyapa->irq);
+ enable_irq(client->irq);
mutex_unlock(&input->mutex);