watchdog: add static inline no-ops if WD is disabled
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Applied-Upstream: next, commit:91936ddc4485
This commit is contained in:
parent
57bce3d6cb
commit
61eebbcf8e
|
@ -17,8 +17,25 @@ struct watchdog {
|
||||||
int (*set_timeout)(struct watchdog *, unsigned);
|
int (*set_timeout)(struct watchdog *, unsigned);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef CONFIG_WATCHDOG
|
||||||
int watchdog_register(struct watchdog *);
|
int watchdog_register(struct watchdog *);
|
||||||
int watchdog_deregister(struct watchdog *);
|
int watchdog_deregister(struct watchdog *);
|
||||||
int watchdog_set_timeout(unsigned);
|
int watchdog_set_timeout(unsigned);
|
||||||
|
#else
|
||||||
|
static inline int watchdog_register(struct watchdog *w)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int watchdog_deregister(struct watchdog *w)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int watchdog_set_timeout(unsigned t)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* INCLUDE_WATCHDOG_H */
|
#endif /* INCLUDE_WATCHDOG_H */
|
||||||
|
|
Loading…
Reference in New Issue