#define pr_fmt(fmt) …
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/fs.h>
#include <linux/miscdevice.h>
#include <linux/init.h>
#include <linux/ioport.h>
#include <linux/watchdog.h>
#include <linux/notifier.h>
#include <linux/reboot.h>
#include <linux/uaccess.h>
#include <linux/io.h>
#define WATCHDOG_VERSION …
#define WATCHDOG_NAME …
#define IO_INDEX_PORT …
#define IO_DATA_PORT …
#define UNLOCK_DATA …
#define LOCK_DATA …
#define DEVICE_REGISTER …
#define DEFAULT_TIMEOUT …
static int timeout = …;
static int timeoutW;
static unsigned long timer_alive;
static int testmode;
static char expect_close;
static DEFINE_SPINLOCK(spinlock);
module_param(timeout, int, 0);
MODULE_PARM_DESC(…) …;
module_param(testmode, int, 0);
MODULE_PARM_DESC(…) …;
static bool nowayout = … WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(…) …;
static int wdt_start(void)
{ … }
static int wdt_stop(void)
{ … }
static int wdt_keepalive(void)
{ … }
static int wdt_set_timeout(int t)
{ … }
static int wdt_get_status(int *status)
{ … }
static int wdt_open(struct inode *inode, struct file *file)
{ … }
static int wdt_release(struct inode *inode, struct file *file)
{ … }
static ssize_t wdt_write(struct file *file, const char __user *buf,
size_t count, loff_t *ppos)
{ … }
static const struct watchdog_info ident = …;
static long wdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{ … }
static int wdt_notify_sys(struct notifier_block *this, unsigned long code,
void *unused)
{ … }
static const struct file_operations wdt_fops = …;
static struct miscdevice wdt_miscdev = …;
static struct notifier_block wdt_notifier = …;
static int __init w83977f_wdt_init(void)
{ … }
static void __exit w83977f_wdt_exit(void)
{ … }
module_init(…) …;
module_exit(w83977f_wdt_exit);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;