diff options
author | Tzung-Bi Shih <tzungbi@google.com> | 2021-12-08 12:55:55 +0300 |
---|---|---|
committer | Wim Van Sebroeck <wim@linux-watchdog.org> | 2022-01-05 12:33:16 +0300 |
commit | 1bafac47a4f70a169427ffcf59fb673d23e39105 (patch) | |
tree | 1fac20ba40046f754a3a92d908344052154a45b1 /drivers/watchdog | |
parent | 2cbc5cd0b55fa2310cc557c77b0665f5e00272de (diff) | |
download | linux-1bafac47a4f70a169427ffcf59fb673d23e39105.tar.xz |
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 <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>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r-- | drivers/watchdog/mtk_wdt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/watchdog/mtk_wdt.c b/drivers/watchdog/mtk_wdt.c index 543cf38bd04e..4577a76dd464 100644 --- a/drivers/watchdog/mtk_wdt.c +++ b/drivers/watchdog/mtk_wdt.c @@ -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); |