summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorClément Le Goffic <clement.legoffic@foss.st.com>2024-12-18 10:22:27 +0100
committerWim Van Sebroeck <wim@linux-watchdog.org>2024-12-30 15:28:02 +0100
commitcc0dc9e871a91aadf5b26a2d7760fb762e0d9203 (patch)
tree139e30e3f8b99d97de72c12c00860cd0f665d72a /drivers
parentLinux 6.13-rc5 (diff)
downloadlinux-cc0dc9e871a91aadf5b26a2d7760fb762e0d9203.tar.xz
linux-cc0dc9e871a91aadf5b26a2d7760fb762e0d9203.zip
watchdog: stm32_iwdg: fix error message during driver probe
The commit 3ab1663af6c1 ("watchdog: stm32_iwdg: Add pretimeout support") introduces the support for the pre-timeout interrupt. The support for this interrupt is optional but the driver uses the platform_get_irq() which produces an error message during the driver probe if we don't have any `interrupts` property in the DT. Use the platform_get_irq_optional() API to get rid of the error message as this property is optional. Fixes: 3ab1663af6c1 ("watchdog: stm32_iwdg: Add pretimeout support") Signed-off-by: Clément Le Goffic <clement.legoffic@foss.st.com> Reviewed-by: Marek Vasut <marex@denx.de> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20241218092227.771133-1-clement.legoffic@foss.st.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/watchdog/stm32_iwdg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/watchdog/stm32_iwdg.c b/drivers/watchdog/stm32_iwdg.c
index d700e0d49bb9..8ad06b54c5ad 100644
--- a/drivers/watchdog/stm32_iwdg.c
+++ b/drivers/watchdog/stm32_iwdg.c
@@ -286,7 +286,7 @@ static int stm32_iwdg_irq_init(struct platform_device *pdev,
if (!wdt->data->has_early_wakeup)
return 0;
- irq = platform_get_irq(pdev, 0);
+ irq = platform_get_irq_optional(pdev, 0);
if (irq <= 0)
return 0;