[PATCH] input: cyapa: fix irq error issue in cyapa_resume

From: Dudley Du
Date: Thu Nov 27 2014 - 00:35:09 EST


This patch is aimed to fix the irq error happened on cyapa_resume when
doing suspend/resume testing.
The root cause of this issue is that the cyapa->irq has been removed but
still used in the driver.

Signed-off-by: Dudley Du <dudley.dulixin@xxxxxxxxx>
---
drivers/input/mouse/cyapa.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/input/mouse/cyapa.c b/drivers/input/mouse/cyapa.c
index c84a9eb..caaba7b 100644
--- a/drivers/input/mouse/cyapa.c
+++ b/drivers/input/mouse/cyapa.c
@@ -938,7 +938,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(cyapa->client->irq) == 0);

mutex_unlock(&input->mutex);

@@ -956,7 +956,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(cyapa->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 +964,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(cyapa->client->irq);

mutex_unlock(&input->mutex);

--
1.9.1

------=_NextPart_000_000E_01D00A48.8E2C85F0
Content-Type: application/octet-stream;
name="input-cyapa-fix-irq-error-issue-in-cyapa_resume.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="input-cyapa-fix-irq-error-issue-in-cyapa_resume.patch"

>From bb717b1c1525ef6b889f0ef735d920eed9e76e72 Mon Sep 17 00:00:00 2001=0A=
From: Dudley Du <dudley.dulixin@xxxxxxxxx>=0A=
Date: Thu, 27 Nov 2014 13:35:09 +0800=0A=
Subject: [PATCH] input: cyapa: fix irq error issue in cyapa_resume=0A=
To: dmitry.torokhov@xxxxxxxxx,=0A=
jmmahler@xxxxxxxxx=0A=
Cc: bleung@xxxxxxxxxx,=0A=
linux-input@xxxxxxxxxxxxxxx=0A=
=0A=
This patch is aimed to fix the irq error happened on cyapa_resume when=0A=
doing suspend/resume testing.=0A=
The root cause of this issue is that the cyapa->irq has been removed but=0A=
still used in the driver.=0A=
=0A=
Signed-off-by: Dudley Du <dudley.dulixin@xxxxxxxxx>=0A=
---=0A=
drivers/input/mouse/cyapa.c | 6 +++---=0A=
1 file changed, 3 insertions(+), 3 deletions(-)=0A=
=0A=
diff --git a/drivers/input/mouse/cyapa.c b/drivers/input/mouse/cyapa.c=0A=
index c84a9eb..caaba7b 100644=0A=
--- a/drivers/input/mouse/cyapa.c=0A=
+++ b/drivers/input/mouse/cyapa.c=0A=
@@ -938,7 +938,7 @@ static int __maybe_unused cyapa_suspend(struct =
device *dev)=0A=
power_mode, error);=0A=
=0A=
if (device_may_wakeup(dev))=0A=
- cyapa->irq_wake =3D (enable_irq_wake(cyapa->irq) =3D=3D 0);=0A=
+ cyapa->irq_wake =3D (enable_irq_wake(cyapa->client->irq) =3D=3D 0);=0A=
=0A=
mutex_unlock(&input->mutex);=0A=
=0A=
@@ -956,7 +956,7 @@ static int __maybe_unused cyapa_resume(struct device =
*dev)=0A=
mutex_lock(&input->mutex);=0A=
=0A=
if (device_may_wakeup(dev) && cyapa->irq_wake)=0A=
- disable_irq_wake(cyapa->irq);=0A=
+ disable_irq_wake(cyapa->client->irq);=0A=
=0A=
power_mode =3D input->users ? PWR_MODE_FULL_ACTIVE : PWR_MODE_OFF;=0A=
error =3D cyapa_set_power_mode(cyapa, PWR_MODE_FULL_ACTIVE);=0A=
@@ -964,7 +964,7 @@ static int __maybe_unused cyapa_resume(struct device =
*dev)=0A=
dev_warn(dev, "resume: set power mode to %d failed: %d\n",=0A=
power_mode, error);=0A=
=0A=
- enable_irq(cyapa->irq);=0A=
+ enable_irq(cyapa->client->irq);=0A=
=0A=
mutex_unlock(&input->mutex);=0A=
=0A=
-- =0A=
1.9.1=0A=
=0A=

------=_NextPart_000_000E_01D00A48.8E2C85F0--

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/