#define pr_fmt(fmt) …
#include <linux/refcount.h>
#include <linux/cdev.h>
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/dma-mapping.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/ioctl.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/module.h>
#include <linux/pagemap.h>
#include <linux/pci.h>
#include <linux/mutex.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/syscalls.h>
#include <linux/types.h>
#include <linux/io.h>
#include <linux/uaccess.h>
#include "vme.h"
#include "vme_user.h"
#define DRIVER_NAME …
static int bus[VME_USER_BUS_MAX];
static unsigned int bus_num;
#define VME_MAJOR …
#define VME_DEVS …
#define MASTER_MINOR …
#define MASTER_MAX …
#define SLAVE_MINOR …
#define SLAVE_MAX …
#define CONTROL_MINOR …
#define PCI_BUF_SIZE …
struct image_desc { … };
static struct image_desc image[VME_DEVS];
static struct cdev *vme_user_cdev;
static struct vme_dev *vme_user_bridge;
static const struct class vme_user_sysfs_class = …;
static const int type[VME_DEVS] = …;
struct vme_user_vma_priv { … };
static ssize_t resource_to_user(int minor, char __user *buf, size_t count,
loff_t *ppos)
{ … }
static ssize_t resource_from_user(unsigned int minor, const char __user *buf,
size_t count, loff_t *ppos)
{ … }
static ssize_t buffer_to_user(unsigned int minor, char __user *buf,
size_t count, loff_t *ppos)
{ … }
static ssize_t buffer_from_user(unsigned int minor, const char __user *buf,
size_t count, loff_t *ppos)
{ … }
static ssize_t vme_user_read(struct file *file, char __user *buf, size_t count,
loff_t *ppos)
{ … }
static ssize_t vme_user_write(struct file *file, const char __user *buf,
size_t count, loff_t *ppos)
{ … }
static loff_t vme_user_llseek(struct file *file, loff_t off, int whence)
{ … }
static int vme_user_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg)
{ … }
static long
vme_user_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{ … }
static void vme_user_vm_open(struct vm_area_struct *vma)
{ … }
static void vme_user_vm_close(struct vm_area_struct *vma)
{ … }
static const struct vm_operations_struct vme_user_vm_ops = …;
static int vme_user_master_mmap(unsigned int minor, struct vm_area_struct *vma)
{ … }
static int vme_user_mmap(struct file *file, struct vm_area_struct *vma)
{ … }
static const struct file_operations vme_user_fops = …;
static int vme_user_match(struct vme_dev *vdev)
{ … }
static int vme_user_probe(struct vme_dev *vdev)
{ … }
static void vme_user_remove(struct vme_dev *dev)
{ … }
static struct vme_driver vme_user_driver = …;
static int __init vme_user_init(void)
{ … }
static void __exit vme_user_exit(void)
{ … }
MODULE_PARM_DESC(…) …;
module_param_array(…);
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
module_init(…) …;
module_exit(vme_user_exit);