Commit f249eef9 authored by Bumsik Kim's avatar Bumsik Kim Committed by Wim Van Sebroeck

watchdog: clarify that stop() is optional

The commit d0684c8a ("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: default avatarBumsik Kim <k.bumsik@gmail.com>
Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20200403031507.63487-1-k.bumsik@gmail.comSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarWim Van Sebroeck <wim@linux-watchdog.org>
parent e56d48e9
...@@ -115,7 +115,7 @@ Add the watchdog operations ...@@ -115,7 +115,7 @@ Add the watchdog operations
--------------------------- ---------------------------
All possible callbacks are defined in 'struct watchdog_ops'. You can find it All possible callbacks are defined in 'struct watchdog_ops'. You can find it
explained in 'watchdog-kernel-api.txt' in this directory. start(), stop() and explained in 'watchdog-kernel-api.txt' in this directory. start() and
owner must be set, the rest are optional. You will easily find corresponding owner must be set, the rest are optional. You will easily find corresponding
functions in the old driver. Note that you will now get a pointer to the functions in the old driver. Note that you will now get a pointer to the
watchdog_device as a parameter to these functions, so you probably have to watchdog_device as a parameter to these functions, so you probably have to
......
...@@ -123,8 +123,8 @@ The list of watchdog operations is defined as:: ...@@ -123,8 +123,8 @@ The list of watchdog operations is defined as::
struct module *owner; struct module *owner;
/* mandatory operations */ /* mandatory operations */
int (*start)(struct watchdog_device *); int (*start)(struct watchdog_device *);
int (*stop)(struct watchdog_device *);
/* optional operations */ /* optional operations */
int (*stop)(struct watchdog_device *);
int (*ping)(struct watchdog_device *); int (*ping)(struct watchdog_device *);
unsigned int (*status)(struct watchdog_device *); unsigned int (*status)(struct watchdog_device *);
int (*set_timeout)(struct watchdog_device *, unsigned int); int (*set_timeout)(struct watchdog_device *, unsigned int);
......
...@@ -37,15 +37,15 @@ struct watchdog_governor; ...@@ -37,15 +37,15 @@ struct watchdog_governor;
* *
* The watchdog_ops structure contains a list of low-level operations * The watchdog_ops structure contains a list of low-level operations
* that control a watchdog device. It also contains the module that owns * that control a watchdog device. It also contains the module that owns
* these operations. The start and stop function are mandatory, all other * these operations. The start function is mandatory, all other
* functions are optional. * functions are optional.
*/ */
struct watchdog_ops { struct watchdog_ops {
struct module *owner; struct module *owner;
/* mandatory operations */ /* mandatory operations */
int (*start)(struct watchdog_device *); int (*start)(struct watchdog_device *);
int (*stop)(struct watchdog_device *);
/* optional operations */ /* optional operations */
int (*stop)(struct watchdog_device *);
int (*ping)(struct watchdog_device *); int (*ping)(struct watchdog_device *);
unsigned int (*status)(struct watchdog_device *); unsigned int (*status)(struct watchdog_device *);
int (*set_timeout)(struct watchdog_device *, unsigned int); int (*set_timeout)(struct watchdog_device *, unsigned int);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment