rtc: m48t59: use platform_get_irq_optional
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Thu, 11 Mar 2021 08:48:09 +0000 (09:48 +0100)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Thu, 11 Mar 2021 08:48:09 +0000 (09:48 +0100)
The IRQ is optional, avoid the error message by using
platform_get_irq_optional.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-m48t59.c

index 1d2e99a70fce828c066b4bbdeedc427803321c2b..f0f6b9b6daecbfeb118676f6e71e7e480a24b246 100644 (file)
@@ -421,7 +421,7 @@ static int m48t59_rtc_probe(struct platform_device *pdev)
        /* Try to get irq number. We also can work in
         * the mode without IRQ.
         */
-       m48t59->irq = platform_get_irq(pdev, 0);
+       m48t59->irq = platform_get_irq_optional(pdev, 0);
        if (m48t59->irq <= 0)
                m48t59->irq = NO_IRQ;