Skip to content

Commit f249eef

Browse files
kbumsikWim Van Sebroeck
authored andcommitted
watchdog: clarify that stop() is optional
The commit d0684c8 ("watchdog: Make stop function optional") made stop function not mandatory, but the comments and the doc weren't reflected. Fix it to clarify. Signed-off-by: Bumsik Kim <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
1 parent e56d48e commit f249eef

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Documentation/watchdog/convert_drivers_to_kernel_api.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ Add the watchdog operations
115115
---------------------------
116116

117117
All possible callbacks are defined in 'struct watchdog_ops'. You can find it
118-
explained in 'watchdog-kernel-api.txt' in this directory. start(), stop() and
118+
explained in 'watchdog-kernel-api.txt' in this directory. start() and
119119
owner must be set, the rest are optional. You will easily find corresponding
120120
functions in the old driver. Note that you will now get a pointer to the
121121
watchdog_device as a parameter to these functions, so you probably have to

Documentation/watchdog/watchdog-kernel-api.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ The list of watchdog operations is defined as::
123123
struct module *owner;
124124
/* mandatory operations */
125125
int (*start)(struct watchdog_device *);
126-
int (*stop)(struct watchdog_device *);
127126
/* optional operations */
127+
int (*stop)(struct watchdog_device *);
128128
int (*ping)(struct watchdog_device *);
129129
unsigned int (*status)(struct watchdog_device *);
130130
int (*set_timeout)(struct watchdog_device *, unsigned int);

include/linux/watchdog.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ struct watchdog_governor;
3737
*
3838
* The watchdog_ops structure contains a list of low-level operations
3939
* that control a watchdog device. It also contains the module that owns
40-
* these operations. The start and stop function are mandatory, all other
40+
* these operations. The start function is mandatory, all other
4141
* functions are optional.
4242
*/
4343
struct watchdog_ops {
4444
struct module *owner;
4545
/* mandatory operations */
4646
int (*start)(struct watchdog_device *);
47-
int (*stop)(struct watchdog_device *);
4847
/* optional operations */
48+
int (*stop)(struct watchdog_device *);
4949
int (*ping)(struct watchdog_device *);
5050
unsigned int (*status)(struct watchdog_device *);
5151
int (*set_timeout)(struct watchdog_device *, unsigned int);

0 commit comments

Comments
 (0)