9
0
Fork 0

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:
Marc Kleine-Budde 2015-05-04 01:13:48 +02:00
parent 57bce3d6cb
commit 61eebbcf8e
1 changed files with 17 additions and 0 deletions

View File

@ -17,8 +17,25 @@ struct watchdog {
int (*set_timeout)(struct watchdog *, unsigned);
};
#ifdef CONFIG_WATCHDOG
int watchdog_register(struct watchdog *);
int watchdog_deregister(struct watchdog *);
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 */