watchdog_pretimeout.h (ff84136cb6a4943f489ad037fe93f43be0573c23) watchdog_pretimeout.h (f77710c4cda01ad9c3672fb2f97bdea9a94da92a)
1#ifndef __WATCHDOG_PRETIMEOUT_H
2#define __WATCHDOG_PRETIMEOUT_H
3
4#define WATCHDOG_GOV_NAME_MAXLEN 20
5
6struct watchdog_device;
7
8struct watchdog_governor {

--- 6 unchanged lines hidden (view full) ---

15int watchdog_register_governor(struct watchdog_governor *gov);
16void watchdog_unregister_governor(struct watchdog_governor *gov);
17
18/* Interfaces to watchdog_dev.c */
19int watchdog_register_pretimeout(struct watchdog_device *wdd);
20void watchdog_unregister_pretimeout(struct watchdog_device *wdd);
21int watchdog_pretimeout_governor_get(struct watchdog_device *wdd, char *buf);
22
1#ifndef __WATCHDOG_PRETIMEOUT_H
2#define __WATCHDOG_PRETIMEOUT_H
3
4#define WATCHDOG_GOV_NAME_MAXLEN 20
5
6struct watchdog_device;
7
8struct watchdog_governor {

--- 6 unchanged lines hidden (view full) ---

15int watchdog_register_governor(struct watchdog_governor *gov);
16void watchdog_unregister_governor(struct watchdog_governor *gov);
17
18/* Interfaces to watchdog_dev.c */
19int watchdog_register_pretimeout(struct watchdog_device *wdd);
20void watchdog_unregister_pretimeout(struct watchdog_device *wdd);
21int watchdog_pretimeout_governor_get(struct watchdog_device *wdd, char *buf);
22
23#if IS_ENABLED(CONFIG_WATCHDOG_PRETIMEOUT_DEFAULT_GOV_NOOP)
24#define WATCHDOG_PRETIMEOUT_DEFAULT_GOV "noop"
25#endif
26
23#else
24static inline int watchdog_register_pretimeout(struct watchdog_device *wdd)
25{
26 return 0;
27}
28
29static inline void watchdog_unregister_pretimeout(struct watchdog_device *wdd)
30{
31}
32
33static inline int watchdog_pretimeout_governor_get(struct watchdog_device *wdd,
34 char *buf)
35{
36 return -EINVAL;
37}
38#endif
39
40#endif
27#else
28static inline int watchdog_register_pretimeout(struct watchdog_device *wdd)
29{
30 return 0;
31}
32
33static inline void watchdog_unregister_pretimeout(struct watchdog_device *wdd)
34{
35}
36
37static inline int watchdog_pretimeout_governor_get(struct watchdog_device *wdd,
38 char *buf)
39{
40 return -EINVAL;
41}
42#endif
43
44#endif