#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/uaccess.h>
#include <linux/input.h>
#include <linux/usb.h>
#include <linux/poll.h>
#define USB_VENDOR_ID_LD …
#define USB_DEVICE_ID_LD_CASSY …
#define USB_DEVICE_ID_LD_CASSY2 …
#define USB_DEVICE_ID_LD_POCKETCASSY …
#define USB_DEVICE_ID_LD_POCKETCASSY2 …
#define USB_DEVICE_ID_LD_MOBILECASSY …
#define USB_DEVICE_ID_LD_MOBILECASSY2 …
#define USB_DEVICE_ID_LD_MICROCASSYVOLTAGE …
#define USB_DEVICE_ID_LD_MICROCASSYCURRENT …
#define USB_DEVICE_ID_LD_MICROCASSYTIME …
#define USB_DEVICE_ID_LD_MICROCASSYTEMPERATURE …
#define USB_DEVICE_ID_LD_MICROCASSYPH …
#define USB_DEVICE_ID_LD_POWERANALYSERCASSY …
#define USB_DEVICE_ID_LD_CONVERTERCONTROLLERCASSY …
#define USB_DEVICE_ID_LD_MACHINETESTCASSY …
#define USB_DEVICE_ID_LD_JWM …
#define USB_DEVICE_ID_LD_DMMP …
#define USB_DEVICE_ID_LD_UMIP …
#define USB_DEVICE_ID_LD_UMIC …
#define USB_DEVICE_ID_LD_UMIB …
#define USB_DEVICE_ID_LD_XRAY …
#define USB_DEVICE_ID_LD_XRAY2 …
#define USB_DEVICE_ID_LD_XRAYCT …
#define USB_DEVICE_ID_LD_VIDEOCOM …
#define USB_DEVICE_ID_LD_MOTOR …
#define USB_DEVICE_ID_LD_COM3LAB …
#define USB_DEVICE_ID_LD_TELEPORT …
#define USB_DEVICE_ID_LD_NETWORKANALYSER …
#define USB_DEVICE_ID_LD_POWERCONTROL …
#define USB_DEVICE_ID_LD_MACHINETEST …
#define USB_DEVICE_ID_LD_MOSTANALYSER …
#define USB_DEVICE_ID_LD_MOSTANALYSER2 …
#define USB_DEVICE_ID_LD_ABSESP …
#define USB_DEVICE_ID_LD_AUTODATABUS …
#define USB_DEVICE_ID_LD_MCT …
#define USB_DEVICE_ID_LD_HYBRID …
#define USB_DEVICE_ID_LD_HEATCONTROL …
#ifdef CONFIG_USB_DYNAMIC_MINORS
#define USB_LD_MINOR_BASE …
#else
#define USB_LD_MINOR_BASE …
#endif
static const struct usb_device_id ld_usb_table[] = …;
MODULE_DEVICE_TABLE(usb, ld_usb_table);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
static int ring_buffer_size = …;
module_param(ring_buffer_size, int, 0000);
MODULE_PARM_DESC(…) …;
static int write_buffer_size = …;
module_param(write_buffer_size, int, 0000);
MODULE_PARM_DESC(…) …;
static int min_interrupt_in_interval = …;
module_param(min_interrupt_in_interval, int, 0000);
MODULE_PARM_DESC(…) …;
static int min_interrupt_out_interval = …;
module_param(min_interrupt_out_interval, int, 0000);
MODULE_PARM_DESC(…) …;
struct ld_usb { … };
static struct usb_driver ld_usb_driver;
static void ld_usb_abort_transfers(struct ld_usb *dev)
{ … }
static void ld_usb_delete(struct ld_usb *dev)
{ … }
static void ld_usb_interrupt_in_callback(struct urb *urb)
{ … }
static void ld_usb_interrupt_out_callback(struct urb *urb)
{ … }
static int ld_usb_open(struct inode *inode, struct file *file)
{ … }
static int ld_usb_release(struct inode *inode, struct file *file)
{ … }
static __poll_t ld_usb_poll(struct file *file, poll_table *wait)
{ … }
static ssize_t ld_usb_read(struct file *file, char __user *buffer, size_t count,
loff_t *ppos)
{ … }
static ssize_t ld_usb_write(struct file *file, const char __user *buffer,
size_t count, loff_t *ppos)
{ … }
static const struct file_operations ld_usb_fops = …;
static struct usb_class_driver ld_usb_class = …;
static int ld_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
{ … }
static void ld_usb_disconnect(struct usb_interface *intf)
{ … }
static struct usb_driver ld_usb_driver = …;
module_usb_driver(…) …;