]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
watchdog: add devm_watchdog_register_device() to watchdog-kernel-api
authorRandy Dunlap <rdunlap@infradead.org>
Fri, 29 May 2026 21:20:20 +0000 (14:20 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 8 Jun 2026 18:53:18 +0000 (11:53 -0700)
devm_watchdog_register_device() is not documented. Add it to the current
kernel API documentation.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Documentation/watchdog/watchdog-kernel-api.rst

index e2c1386c95509ae32afca4cd23acfc221dbadf63..7a907cb6f3d3fc6fcf183dc69e71b36d4bfc00d7 100644 (file)
@@ -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 {