watchdog: mtk_wdt: use platform_get_irq_optional
Subsystems (2)
PATCH 1/1 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:
Quoted 1 line
Quoted 1 line
Quoted 1 line
mtk-wdt 10007000.watchdog: IRQ index 0 not found
Signed-off-by Tzung-Bi Shih <[email protected]>
---
The patch bases on linux-next next-20211208.
drivers/watchdog/mtk_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/watchdog/mtk_wdt.c +1 -1
@@ -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);
Signature · 1 line
2.34.1.173.g76aa8bc2d0-goog
Quoted 6 lines · Tzung-Bi Shih
The watchdog pre-timeout (bark) interrupt is optional. Use
platform_get_irq_optional()to avoid seeing such following error message:Quoted 1 line
Quoted 1 line
Quoted 1 line
mtk-wdt 10007000.watchdog: IRQ index 0 not found
Signed-off-by Tzung-Bi Shih <[email protected]>
Reviewed-by Guenter Roeck <[email protected]>
Quoted 22 lines
---
The patch bases on linux-next next-20211208.drivers/watchdog/mtk_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/watchdog/mtk_wdt.c +1
-1@@ -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);Signature · 1 line
2.34.1.173.g76aa8bc2d0-goog