#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/uaccess.h>
#include <acpi/apei.h>
#include <linux/miscdevice.h>
#include "apei-internal.h"
#define ERST_DBG_PFX …
#define ERST_DBG_RECORD_LEN_MAX …
static void *erst_dbg_buf;
static unsigned int erst_dbg_buf_len;
static DEFINE_MUTEX(erst_dbg_mutex);
static int erst_dbg_open(struct inode *inode, struct file *file)
{ … }
static int erst_dbg_release(struct inode *inode, struct file *file)
{ … }
static long erst_dbg_ioctl(struct file *f, unsigned int cmd, unsigned long arg)
{ … }
static ssize_t erst_dbg_read(struct file *filp, char __user *ubuf,
size_t usize, loff_t *off)
{ … }
static ssize_t erst_dbg_write(struct file *filp, const char __user *ubuf,
size_t usize, loff_t *off)
{ … }
static const struct file_operations erst_dbg_ops = …;
static struct miscdevice erst_dbg_dev = …;
static __init int erst_dbg_init(void)
{ … }
static __exit void erst_dbg_exit(void)
{ … }
module_init(…) …;
module_exit(erst_dbg_exit);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;