#define pr_fmt(fmt) …
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/types.h>
#include <linux/miscdevice.h>
#include <linux/watchdog.h>
#include <linux/fs.h>
#include <linux/ioport.h>
#include <linux/platform_device.h>
#include <linux/init.h>
#include <linux/io.h>
#include <linux/uaccess.h>
#define DRV_NAME …
#define WATCHDOG_NAME …
#define WATCHDOG_TIMEOUT …
static struct platform_device *advwdt_platform_device;
static unsigned long advwdt_is_open;
static char adv_expect_close;
static int wdt_stop = …;
module_param(wdt_stop, int, 0);
MODULE_PARM_DESC(…) …;
static int wdt_start = …;
module_param(wdt_start, int, 0);
MODULE_PARM_DESC(…) …;
static int timeout = …;
module_param(timeout, int, 0);
MODULE_PARM_DESC(…) …;
static bool nowayout = … WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(…) …;
static void advwdt_ping(void)
{ … }
static void advwdt_disable(void)
{ … }
static int advwdt_set_heartbeat(int t)
{ … }
static ssize_t advwdt_write(struct file *file, const char __user *buf,
size_t count, loff_t *ppos)
{ … }
static long advwdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{ … }
static int advwdt_open(struct inode *inode, struct file *file)
{ … }
static int advwdt_close(struct inode *inode, struct file *file)
{ … }
static const struct file_operations advwdt_fops = …;
static struct miscdevice advwdt_miscdev = …;
static int __init advwdt_probe(struct platform_device *dev)
{ … }
static void advwdt_remove(struct platform_device *dev)
{ … }
static void advwdt_shutdown(struct platform_device *dev)
{ … }
static struct platform_driver advwdt_driver = …;
static int __init advwdt_init(void)
{ … }
static void __exit advwdt_exit(void)
{ … }
module_init(…) …;
module_exit(advwdt_exit);
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;