#include <linux/module.h>
#include <linux/usb.h>
#include <linux/slab.h>
#include <linux/sched.h>
#include <linux/mutex.h>
#include <linux/poll.h>
#include <linux/usb/iowarrior.h>
#define DRIVER_AUTHOR …
#define DRIVER_DESC …
#define USB_VENDOR_ID_CODEMERCS …
#define USB_DEVICE_ID_CODEMERCS_IOW40 …
#define USB_DEVICE_ID_CODEMERCS_IOW24 …
#define USB_DEVICE_ID_CODEMERCS_IOWPV1 …
#define USB_DEVICE_ID_CODEMERCS_IOWPV2 …
#define USB_DEVICE_ID_CODEMERCS_IOW56 …
#define USB_DEVICE_ID_CODEMERCS_IOW28 …
#define USB_DEVICE_ID_CODEMERCS_IOW28L …
#define USB_DEVICE_ID_CODEMERCS_IOW100 …
#define USB_DEVICE_ID_CODEMERCS_IOW24SAG …
#define USB_DEVICE_ID_CODEMERCS_IOW56AM …
#ifdef CONFIG_USB_DYNAMIC_MINORS
#define IOWARRIOR_MINOR_BASE …
#else
#define IOWARRIOR_MINOR_BASE …
#endif
#define MAX_INTERRUPT_BUFFER …
#define MAX_WRITES_IN_FLIGHT …
MODULE_AUTHOR(…);
MODULE_DESCRIPTION(…);
MODULE_LICENSE(…) …;
static struct usb_driver iowarrior_driver;
struct iowarrior { … };
#define USB_REQ_GET_REPORT …
static int usb_get_report(struct usb_device *dev,
struct usb_host_interface *inter, unsigned char type,
unsigned char id, void *buf, int size)
{ … }
#define USB_REQ_SET_REPORT …
static int usb_set_report(struct usb_interface *intf, unsigned char type,
unsigned char id, void *buf, int size)
{ … }
static const struct usb_device_id iowarrior_ids[] = …;
MODULE_DEVICE_TABLE(usb, iowarrior_ids);
static void iowarrior_callback(struct urb *urb)
{ … }
static void iowarrior_write_callback(struct urb *urb)
{ … }
static inline void iowarrior_delete(struct iowarrior *dev)
{ … }
static int read_index(struct iowarrior *dev)
{ … }
static ssize_t iowarrior_read(struct file *file, char __user *buffer,
size_t count, loff_t *ppos)
{ … }
static ssize_t iowarrior_write(struct file *file,
const char __user *user_buffer,
size_t count, loff_t *ppos)
{ … }
static long iowarrior_ioctl(struct file *file, unsigned int cmd,
unsigned long arg)
{ … }
static int iowarrior_open(struct inode *inode, struct file *file)
{ … }
static int iowarrior_release(struct inode *inode, struct file *file)
{ … }
static __poll_t iowarrior_poll(struct file *file, poll_table * wait)
{ … }
static const struct file_operations iowarrior_fops = …;
static char *iowarrior_devnode(const struct device *dev, umode_t *mode)
{ … }
static struct usb_class_driver iowarrior_class = …;
static int iowarrior_probe(struct usb_interface *interface,
const struct usb_device_id *id)
{ … }
static void iowarrior_disconnect(struct usb_interface *interface)
{ … }
static struct usb_driver iowarrior_driver = …;
module_usb_driver(…) …;