max17042_battery: Add IRQF_ONESHOT flag to use default irq handler
authorJonghwa Lee <jonghwa3.lee@samsung.com>
Wed, 18 Dec 2013 03:53:53 +0000 (12:53 +0900)
committerAnton Vorontsov <anton@enomsg.org>
Tue, 24 Dec 2013 02:59:41 +0000 (18:59 -0800)
This patch adds IRQF_ONESHOT flag to max17042's irq since it uses primary
default handler. Without this flag, requesting irq will be denied with
returning error.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
drivers/power/max17042_battery.c

index e0b22f9..66da691 100644 (file)
@@ -741,9 +741,9 @@ static int max17042_probe(struct i2c_client *client,
 
        if (client->irq) {
                ret = request_threaded_irq(client->irq, NULL,
-                                               max17042_thread_handler,
-                                               IRQF_TRIGGER_FALLING,
-                                               chip->battery.name, chip);
+                                       max17042_thread_handler,
+                                       IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
+                                       chip->battery.name, chip);
                if (!ret) {
                        regmap_read(chip->regmap, MAX17042_CONFIG, &val);
                        val |= CONFIG_ALRT_BIT_ENBL;