* bounds.
*/
int watchdog_init_timeout(struct watchdog_device *wdd,
- unsigned int timeout_parm, struct device *dev)
+ unsigned int timeout_parm,
+ const struct device *dev)
{
const char *dev_str = wdd->parent ? dev_name(wdd->parent) :
(const char *)wdd->info->identity;
#define WATCHDOG_NOWAYOUT_INIT_STATUS (WATCHDOG_NOWAYOUT << WDOG_NO_WAY_OUT)
/* Use the following function to check whether or not the watchdog is active */
-static inline bool watchdog_active(struct watchdog_device *wdd)
+static inline bool watchdog_active(const struct watchdog_device *wdd)
{
return test_bit(WDOG_ACTIVE, &wdd->status);
}
* Use the following function to check whether or not the hardware watchdog
* is running
*/
-static inline bool watchdog_hw_running(struct watchdog_device *wdd)
+static inline bool watchdog_hw_running(const struct watchdog_device *wdd)
{
return test_bit(WDOG_HW_RUNNING, &wdd->status);
}
}
/* Use the following function to check if a timeout value is invalid */
-static inline bool watchdog_timeout_invalid(struct watchdog_device *wdd, unsigned int t)
+static inline bool watchdog_timeout_invalid(const struct watchdog_device *wdd,
+ unsigned int t)
{
/*
* The timeout is invalid if
}
/* Use the following function to check if a pretimeout value is invalid */
-static inline bool watchdog_pretimeout_invalid(struct watchdog_device *wdd,
+static inline bool watchdog_pretimeout_invalid(const struct watchdog_device *wdd,
unsigned int t)
{
return t && wdd->timeout && t >= wdd->timeout;
/* drivers/watchdog/watchdog_core.c */
void watchdog_set_restart_priority(struct watchdog_device *wdd, int priority);
extern int watchdog_init_timeout(struct watchdog_device *wdd,
- unsigned int timeout_parm, struct device *dev);
+ unsigned int timeout_parm,
+ const struct device *dev);
extern int watchdog_register_device(struct watchdog_device *);
extern void watchdog_unregister_device(struct watchdog_device *);
int watchdog_dev_suspend(struct watchdog_device *wdd);