#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/usb.h>
#define DRIVER_AUTHOR …
#define DRIVER_DESC …
#define TRANCEVIBRATOR_VENDOR_ID …
#define TRANCEVIBRATOR_PRODUCT_ID …
static const struct usb_device_id id_table[] = …;
MODULE_DEVICE_TABLE (usb, id_table);
struct trancevibrator { … };
static ssize_t speed_show(struct device *dev, struct device_attribute *attr,
char *buf)
{ … }
static ssize_t speed_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static DEVICE_ATTR_RW(speed);
static struct attribute *tv_attrs[] = …;
ATTRIBUTE_GROUPS(…);
static int tv_probe(struct usb_interface *interface,
const struct usb_device_id *id)
{ … }
static void tv_disconnect(struct usb_interface *interface)
{ … }
static struct usb_driver tv_driver = …;
module_usb_driver(…) …;
MODULE_AUTHOR(…);
MODULE_DESCRIPTION(…);
MODULE_LICENSE(…) …;