Skip to content

Commit 1bafac4

Browse files
Tzung-Bi ShihWim Van Sebroeck
authored andcommitted
watchdog: mtk_wdt: use platform_get_irq_optional
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 <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
1 parent 2cbc5cd commit 1bafac4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/watchdog/mtk_wdt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ static int mtk_wdt_probe(struct platform_device *pdev)
339339
if (IS_ERR(mtk_wdt->wdt_base))
340340
return PTR_ERR(mtk_wdt->wdt_base);
341341

342-
irq = platform_get_irq(pdev, 0);
342+
irq = platform_get_irq_optional(pdev, 0);
343343
if (irq > 0) {
344344
err = devm_request_irq(&pdev->dev, irq, mtk_wdt_isr, 0, "wdt_bark",
345345
&mtk_wdt->wdt_dev);

0 commit comments

Comments
 (0)