1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Copyright (C) 2015-2016 Mentor Graphics
6 #include <linux/module.h>
7 #include <linux/printk.h>
8 #include <linux/watchdog.h>
10 #include "watchdog_pretimeout.h"
13 * pretimeout_noop - No operation on watchdog pretimeout event
14 * @wdd - watchdog_device
16 * This function prints a message about pretimeout to kernel log.
18 static void pretimeout_noop(struct watchdog_device *wdd)
20 pr_alert("watchdog%d: pretimeout event\n", wdd->id);
23 static struct watchdog_governor watchdog_gov_noop = {
25 .pretimeout = pretimeout_noop,
28 static int __init watchdog_gov_noop_register(void)
30 return watchdog_register_governor(&watchdog_gov_noop);
33 static void __exit watchdog_gov_noop_unregister(void)
35 watchdog_unregister_governor(&watchdog_gov_noop);
37 module_init(watchdog_gov_noop_register);
38 module_exit(watchdog_gov_noop_unregister);
40 MODULE_AUTHOR("Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>");
41 MODULE_DESCRIPTION("Panic watchdog pretimeout governor");
42 MODULE_LICENSE("GPL");