From 0f3999f528715d4d8f45802e9527c54b92350413 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Fri, 29 May 2026 14:20:20 -0700 Subject: [PATCH] watchdog: add devm_watchdog_register_device() to watchdog-kernel-api devm_watchdog_register_device() is not documented. Add it to the current kernel API documentation. Signed-off-by: Randy Dunlap Signed-off-by: Guenter Roeck --- Documentation/watchdog/watchdog-kernel-api.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Documentation/watchdog/watchdog-kernel-api.rst b/Documentation/watchdog/watchdog-kernel-api.rst index e2c1386c9550..7a907cb6f3d3 100644 --- a/Documentation/watchdog/watchdog-kernel-api.rst +++ b/Documentation/watchdog/watchdog-kernel-api.rst @@ -42,6 +42,14 @@ The watchdog subsystem includes an registration deferral mechanism, which allows you to register an watchdog as early as you wish during the boot process. +There is also a resource-managed watchdog_register_device(), +devm_watchdog_register_device(). If you use this to register a watchdog +device, watchdog_unregister_device() is called automatically on driver +detach:: + + int devm_watchdog_register_device(struct device *dev, + struct watchdog_device *wdd); + The watchdog device structure looks like this:: struct watchdog_device {