rtc: rx8025: fix irq handler registration
authorAkinobu Mita <akinobu.mita@gmail.com>
Mon, 15 Feb 2016 14:49:06 +0000 (23:49 +0900)
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>
Mon, 14 Mar 2016 16:08:19 +0000 (17:08 +0100)
When IRQ line for this chips is connected, devm_request_threaded_irq()
refuses to register irq handler with the following message.

genirq: Threaded irq requested with handler=NULL and !ONESHOT for irq

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Wolfgang Grandegger <wg@grandegger.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
drivers/rtc/rtc-rx8025.c

index 17341fe..18240f5 100644 (file)
@@ -538,8 +538,9 @@ static int rx8025_probe(struct i2c_client *client,
        if (client->irq > 0) {
                dev_info(&client->dev, "IRQ %d supplied\n", client->irq);
                err = devm_request_threaded_irq(&client->dev, client->irq, NULL,
-                                               rx8025_handle_irq, 0, "rx8025",
-                                               client);
+                                               rx8025_handle_irq,
+                                               IRQF_ONESHOT,
+                                               "rx8025", client);
                if (err) {
                        dev_err(&client->dev, "unable to request IRQ, alarms disabled\n");
                        client->irq = 0;