From: Pengpeng Hou <hppiscas@163.com>
To: alexandre.belloni@bootlin.com
Cc: linux-rtc@vger.kernel.org, wim@linux-watchdog.org,
linux@roeck-us.net, linux-watchdog@vger.kernel.org,
linux-kernel@vger.kernel.org, hppiscas@163.com
Subject: [PATCH 2/2] rtc: m41t93: select the watchdog core when enabled
Date: Mon, 30 Nov 2026 21:38:53 +0800 [thread overview]
Message-ID: <20261130133853.87210-3-hppiscas@163.com> (raw)
In-Reply-To: <20261130133853.87210-1-hppiscas@163.com>
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@163.com>
---
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.
next prev parent reply other threads:[~2026-11-30 13:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 13:38 [PATCH 0/2] rtc: m41t93: fix missing subsystem dependencies Pengpeng Hou
2026-11-30 13:38 ` [PATCH 1/2] rtc: m41t93: select REGMAP_SPI Pengpeng Hou
2026-11-30 13:38 ` Pengpeng Hou [this message]
2026-11-30 13:43 ` [PATCH 0/2] rtc: m41t93: fix missing subsystem dependencies sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261130133853.87210-3-hppiscas@163.com \
--to=hppiscas@163.com \
--cc=alexandre.belloni@bootlin.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=wim@linux-watchdog.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox