linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] max17042_battery: Handle irq request failure case
@ 2012-05-04 23:13 Ramakrishna Pallala
  2012-05-05 10:32 ` Anton Vorontsov
  0 siblings, 1 reply; 2+ messages in thread
From: Ramakrishna Pallala @ 2012-05-04 23:13 UTC (permalink / raw)
  To: linux-kernel; +Cc: Anton Vorontsov, Ramakrishna Pallala

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@intel.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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] max17042_battery: Handle irq request failure case
  2012-05-04 23:13 [PATCH] max17042_battery: Handle irq request failure case Ramakrishna Pallala
@ 2012-05-05 10:32 ` Anton Vorontsov
  0 siblings, 0 replies; 2+ messages in thread
From: Anton Vorontsov @ 2012-05-05 10:32 UTC (permalink / raw)
  To: Ramakrishna Pallala; +Cc: linux-kernel

On Sat, May 05, 2012 at 04:43:10AM +0530, Ramakrishna Pallala wrote:
> 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@intel.com>
> ---

Applied, thanks!

-- 
Anton Vorontsov
Email: cbouatmailru@gmail.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-05-05 10:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-04 23:13 [PATCH] max17042_battery: Handle irq request failure case Ramakrishna Pallala
2012-05-05 10:32 ` Anton Vorontsov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).