Hi all,
I have sometimes a panic using the android and this seems to fix the
issue. I verified the panic
with the red light :( and now I can't reproduce.
Michael
Avoid the call of the irq funtion until the system is not resumed. The
call is done by the resume handler.
Signed-off-by: Michael Trimarchi <[email protected]>
---
diff --git a/drivers/mfd/pcf50633-core.c b/drivers/mfd/pcf50633-core.c
index f668b9a..58fb4f9 100644
--- a/drivers/mfd/pcf50633-core.c
+++ b/drivers/mfd/pcf50633-core.c
@@ -379,12 +379,16 @@ static irqreturn_t pcf50633_irq(int irq, void *data)
{
struct pcf50633 *pcf = data;
+ /* Have we just resumed ? */
+ if (pcf->is_suspended)
+ goto out_int;
+
get_device(pcf->dev);
disable_irq(pcf->irq);
schedule_work(&pcf->irq_work);
-
+out_int:
return IRQ_HANDLED;
}
@@ -497,6 +501,7 @@ static int pcf50633_probe(struct i2c_client *client,
i2c_set_clientdata(client, pcf);
pcf->dev = &client->dev;
pcf->i2c_client = client;
+ pcf->is_suspended = 0;
INIT_WORK(&pcf->irq_work, pcf50633_irq_worker);