[PATCH 2/2] rtc: m41t93: select the watchdog core when enabled
From: Pengpeng Hou
Date: Mon Nov 30 2026 - 08:39:41 EST
The M41T93 driver compiles its watchdog data, operations and
registration under CONFIG_WATCHDOG. That top-level switch does not
ensure that WATCHDOG_CORE is linked at the level required by the RTC
driver. RTC_DRV_M41T93=y with WATCHDOG_CORE=m therefore leaves an
unresolved devm_watchdog_register_device() reference.
Select WATCHDOG_CORE when WATCHDOG is enabled. This preserves
watchdog registration when requested, rather than silently omitting
it from a built-in RTC driver. The DS1307, ABX80X and PCF2127 RTC
drivers already use the same conditional selection.
The issue was found by our static-analysis tool and manually reviewed.
Fixes: 15ec2ce19962 ("rtc: m41t93: Add watchdog support")
Signed-off-by: Pengpeng Hou <hppiscas@xxxxxxx>
---
AI assistance: gpt 5 (patch preparation and review).
drivers/rtc/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index 8f9e59a..bfbe7e4 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -817,6 +817,7 @@ if SPI_MASTER
config RTC_DRV_M41T93
tristate "ST M41T93"
select REGMAP_SPI
+ select WATCHDOG_CORE if WATCHDOG
help
If you say yes here you will get support for the
ST M41T93 SPI RTC chip.