[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Sat, 5 May 2012 04:43:10 +0530
From: Ramakrishna Pallala <ramakrishna.pallala@...el.com>
To: linux-kernel@...r.kernel.org
Cc: Anton Vorontsov <cbouatmailru@...il.com>,
Ramakrishna Pallala <ramakrishna.pallala@...el.com>
Subject: [PATCH] max17042_battery: Handle irq request failure case
suspend/resume functions take action based upon the fuel gauge
interrupt. If the rquest irq fails we should assign 0 to client->irq.
Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@...el.com>
---
drivers/power/max17042_battery.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/power/max17042_battery.c b/drivers/power/max17042_battery.c
index 3c16724..db776a2 100644
--- a/drivers/power/max17042_battery.c
+++ b/drivers/power/max17042_battery.c
@@ -707,9 +707,11 @@ static int __devinit max17042_probe(struct i2c_client *client,
reg |= CONFIG_ALRT_BIT_ENBL;
max17042_write_reg(client, MAX17042_CONFIG, reg);
max17042_set_soc_threshold(chip, 1);
- } else
+ } else {
+ client->irq = 0;
dev_err(&client->dev, "%s(): cannot get IRQ\n",
__func__);
+ }
}
reg = max17042_read_reg(chip->client, MAX17042_STATUS);
--
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists