Commit f68a95cd authored by Dudley Du's avatar Dudley Du Committed by Dmitry Torokhov

Input: cyapa - fix resuming the device

Chage b1cfa7b4 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: default avatarJeremiah Mahler <jmmahler@gmail.com>
Signed-off-by: default avatarDudley Du <dudley.dulixin@gmail.com>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent f2d347ff
...@@ -206,7 +206,6 @@ struct cyapa { ...@@ -206,7 +206,6 @@ struct cyapa {
struct i2c_client *client; struct i2c_client *client;
struct input_dev *input; struct input_dev *input;
char phys[32]; /* device physical location */ char phys[32]; /* device physical location */
int irq;
bool irq_wake; /* irq wake is enabled */ bool irq_wake; /* irq wake is enabled */
bool smbus; bool smbus;
...@@ -938,7 +937,7 @@ static int __maybe_unused cyapa_suspend(struct device *dev) ...@@ -938,7 +937,7 @@ static int __maybe_unused cyapa_suspend(struct device *dev)
power_mode, error); power_mode, error);
if (device_may_wakeup(dev)) 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); mutex_unlock(&input->mutex);
...@@ -956,7 +955,7 @@ static int __maybe_unused cyapa_resume(struct device *dev) ...@@ -956,7 +955,7 @@ static int __maybe_unused cyapa_resume(struct device *dev)
mutex_lock(&input->mutex); mutex_lock(&input->mutex);
if (device_may_wakeup(dev) && cyapa->irq_wake) 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; power_mode = input->users ? PWR_MODE_FULL_ACTIVE : PWR_MODE_OFF;
error = cyapa_set_power_mode(cyapa, PWR_MODE_FULL_ACTIVE); error = cyapa_set_power_mode(cyapa, PWR_MODE_FULL_ACTIVE);
...@@ -964,7 +963,7 @@ static int __maybe_unused cyapa_resume(struct device *dev) ...@@ -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", dev_warn(dev, "resume: set power mode to %d failed: %d\n",
power_mode, error); power_mode, error);
enable_irq(cyapa->irq); enable_irq(client->irq);
mutex_unlock(&input->mutex); mutex_unlock(&input->mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment