Skip to content

Commit

Permalink
watchdog: mtk_wdt: use platform_get_irq_optional
Browse files Browse the repository at this point in the history
The watchdog pre-timeout (bark) interrupt is optional.  Use
platform_get_irq_optional() to avoid seeing such following
error message:
>>> mtk-wdt 10007000.watchdog: IRQ index 0 not found

Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20211208095555.4099551-1-tzungbi@google.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
  • Loading branch information
Tzung-Bi Shih authored and Wim Van Sebroeck committed Jan 5, 2022
1 parent 2cbc5cd commit 1bafac4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/watchdog/mtk_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ static int mtk_wdt_probe(struct platform_device *pdev)
if (IS_ERR(mtk_wdt->wdt_base))
return PTR_ERR(mtk_wdt->wdt_base);

irq = platform_get_irq(pdev, 0);
irq = platform_get_irq_optional(pdev, 0);
if (irq > 0) {
err = devm_request_irq(&pdev->dev, irq, mtk_wdt_isr, 0, "wdt_bark",
&mtk_wdt->wdt_dev);
Expand Down

0 comments on commit 1bafac4

Please sign in to comment.