#include <linux/module.h>
#include <linux/kernel.h>
#include <asm/byteorder.h>
#include <linux/usb/ch9.h>
#include <linux/usb/composite.h>
#include <linux/usb/gadget.h>
#include <linux/usb/g_printer.h>
USB_GADGET_COMPOSITE_OPTIONS(…);
#define DRIVER_DESC …
#define DRIVER_VERSION …
static const char shortname [] = …;
#include "u_printer.h"
#define PRINTER_VENDOR_NUM …
#define PRINTER_PRODUCT_NUM …
module_param_named(iSerialNum, coverwrite.serial_number, charp, S_IRUGO);
MODULE_PARM_DESC(…) …;
static char *iPNPstring;
module_param(iPNPstring, charp, S_IRUGO);
MODULE_PARM_DESC(…) …;
static unsigned qlen = …;
module_param(qlen, uint, S_IRUGO|S_IWUSR);
MODULE_PARM_DESC(…) …;
#define QLEN …
static struct usb_function_instance *fi_printer;
static struct usb_function *f_printer;
static struct usb_device_descriptor device_desc = …;
static const struct usb_descriptor_header *otg_desc[2];
static char product_desc [40] = …;
static char serial_num [40] = …;
static char *pnp_string = …;
static struct usb_string strings [] = …;
static struct usb_gadget_strings stringtab_dev = …;
static struct usb_gadget_strings *dev_strings[] = …;
static struct usb_configuration printer_cfg_driver = …;
static int printer_do_config(struct usb_configuration *c)
{ … }
static int printer_bind(struct usb_composite_dev *cdev)
{ … }
static int printer_unbind(struct usb_composite_dev *cdev)
{ … }
static struct usb_composite_driver printer_driver = …;
module_usb_composite_driver(…);
MODULE_DESCRIPTION(…);
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;