#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/init.h>
#include <linux/fs.h>
#include <linux/pci.h>
#include <linux/ioport.h>
#include <linux/jiffies.h>
#include <linux/platform_device.h>
#include <linux/uaccess.h>
#include <linux/io.h>
#include "nv_tco.h"
#define TCO_VERSION …
#define TCO_MODULE_NAME …
#define TCO_DRIVER_NAME …
static unsigned int tcobase;
static DEFINE_SPINLOCK(tco_lock);
static unsigned long timer_alive;
static char tco_expect_close;
static struct pci_dev *tco_pci;
static struct platform_device *nv_tco_platform_device;
#define WATCHDOG_HEARTBEAT …
static int heartbeat = …;
module_param(heartbeat, int, 0);
MODULE_PARM_DESC(…) …;
static bool nowayout = … WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(…) …;
static inline unsigned char seconds_to_ticks(int seconds)
{ … }
static void tco_timer_start(void)
{ … }
static void tco_timer_stop(void)
{ … }
static void tco_timer_keepalive(void)
{ … }
static int tco_timer_set_heartbeat(int t)
{ … }
static int nv_tco_open(struct inode *inode, struct file *file)
{ … }
static int nv_tco_release(struct inode *inode, struct file *file)
{ … }
static ssize_t nv_tco_write(struct file *file, const char __user *data,
size_t len, loff_t *ppos)
{ … }
static long nv_tco_ioctl(struct file *file, unsigned int cmd,
unsigned long arg)
{ … }
static const struct file_operations nv_tco_fops = …;
static struct miscdevice nv_tco_miscdev = …;
static const struct pci_device_id tco_pci_tbl[] = …;
MODULE_DEVICE_TABLE(pci, tco_pci_tbl);
static unsigned char nv_tco_getdevice(void)
{ … }
static int nv_tco_init(struct platform_device *dev)
{ … }
static void nv_tco_cleanup(void)
{ … }
static void nv_tco_remove(struct platform_device *dev)
{ … }
static void nv_tco_shutdown(struct platform_device *dev)
{ … }
static struct platform_driver nv_tco_driver = …;
static int __init nv_tco_init_module(void)
{ … }
static void __exit nv_tco_cleanup_module(void)
{ … }
module_init(…) …;
module_exit(nv_tco_cleanup_module);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;