#define pr_fmt(fmt) …
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/miscdevice.h>
#include <linux/watchdog.h>
#include <linux/ioport.h>
#include <linux/spinlock.h>
#include <linux/notifier.h>
#include <linux/reboot.h>
#include <linux/init.h>
#include <linux/pnp.h>
#include <linux/fs.h>
#include <linux/semaphore.h>
#include <linux/io.h>
#include <linux/uaccess.h>
#define SC1200_MODULE_VER …
#define SC1200_MODULE_NAME …
#define MAX_TIMEOUT …
#define PMIR …
#define PMDR …
#define FER1 …
#define FER2 …
#define PMC1 …
#define PMC2 …
#define PMC3 …
#define WDTO …
#define WDCF …
#define WDST …
#define KBC_IRQ …
#define MSE_IRQ …
#define UART1_IRQ …
#define UART2_IRQ …
static int timeout = …;
static int io = …;
static int io_len = …;
static unsigned long open_flag;
static char expect_close;
static DEFINE_SPINLOCK(sc1200wdt_lock);
#if defined CONFIG_PNP
static int isapnp = …;
static struct pnp_dev *wdt_dev;
module_param(isapnp, int, 0);
MODULE_PARM_DESC(…) …;
#endif
module_param_hw(io, int, ioport, 0);
MODULE_PARM_DESC(…) …;
module_param(timeout, int, 0);
MODULE_PARM_DESC(…) …;
static bool nowayout = … WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(…) …;
static inline void __sc1200wdt_read_data(unsigned char index,
unsigned char *data)
{ … }
static void sc1200wdt_read_data(unsigned char index, unsigned char *data)
{ … }
static inline void __sc1200wdt_write_data(unsigned char index,
unsigned char data)
{ … }
static inline void sc1200wdt_write_data(unsigned char index,
unsigned char data)
{ … }
static void sc1200wdt_start(void)
{ … }
static void sc1200wdt_stop(void)
{ … }
static inline int sc1200wdt_status(void)
{ … }
static int sc1200wdt_open(struct inode *inode, struct file *file)
{ … }
static long sc1200wdt_ioctl(struct file *file, unsigned int cmd,
unsigned long arg)
{ … }
static int sc1200wdt_release(struct inode *inode, struct file *file)
{ … }
static ssize_t sc1200wdt_write(struct file *file, const char __user *data,
size_t len, loff_t *ppos)
{ … }
static int sc1200wdt_notify_sys(struct notifier_block *this,
unsigned long code, void *unused)
{ … }
static struct notifier_block sc1200wdt_notifier = …;
static const struct file_operations sc1200wdt_fops = …;
static struct miscdevice sc1200wdt_miscdev = …;
static int __init sc1200wdt_probe(void)
{ … }
#if defined CONFIG_PNP
static const struct pnp_device_id scl200wdt_pnp_devices[] = …;
static int scl200wdt_pnp_probe(struct pnp_dev *dev,
const struct pnp_device_id *dev_id)
{ … }
static void scl200wdt_pnp_remove(struct pnp_dev *dev)
{ … }
static struct pnp_driver scl200wdt_pnp_driver = …;
#endif
static int __init sc1200wdt_init(void)
{ … }
static void __exit sc1200wdt_exit(void)
{ … }
module_init(…) …;
module_exit(sc1200wdt_exit);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;