2 * Copyright (C) 2015-2016 Mentor Graphics
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
11 #include <linux/module.h>
12 #include <linux/printk.h>
13 #include <linux/watchdog.h>
15 #include "watchdog_pretimeout.h"
18 * pretimeout_noop - No operation on watchdog pretimeout event
19 * @wdd - watchdog_device
21 * This function prints a message about pretimeout to kernel log.
23 static void pretimeout_noop(struct watchdog_device
*wdd
)
25 pr_alert("watchdog%d: pretimeout event\n", wdd
->id
);
28 static struct watchdog_governor watchdog_gov_noop
= {
30 .pretimeout
= pretimeout_noop
,
33 static int __init
watchdog_gov_noop_register(void)
35 return watchdog_register_governor(&watchdog_gov_noop
);
38 static void __exit
watchdog_gov_noop_unregister(void)
40 watchdog_unregister_governor(&watchdog_gov_noop
);
42 module_init(watchdog_gov_noop_register
);
43 module_exit(watchdog_gov_noop_unregister
);
45 MODULE_AUTHOR("Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>");
46 MODULE_DESCRIPTION("Panic watchdog pretimeout governor");
47 MODULE_LICENSE("GPL");