#include <linux/kernel.h>
#include <linux/device.h>
#include <linux/kstrtox.h>
#include <linux/module.h>
#include <linux/tty.h>
#include <linux/tty_flip.h>
#include "u_serial.h"
#define GS_VERSION_STR …
#define GS_VERSION_NUM …
#define GS_LONG_NAME …
#define GS_VERSION_NAME …
USB_GADGET_COMPOSITE_OPTIONS(…);
#define GS_VENDOR_ID …
#define GS_PRODUCT_ID …
#define GS_CDC_PRODUCT_ID …
#define GS_CDC_OBEX_PRODUCT_ID …
#define STRING_DESCRIPTION_IDX …
static struct usb_string strings_dev[] = …;
static struct usb_gadget_strings stringtab_dev = …;
static struct usb_gadget_strings *dev_strings[] = …;
static struct usb_device_descriptor device_desc = …;
static const struct usb_descriptor_header *otg_desc[2];
MODULE_DESCRIPTION(…);
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
static bool use_acm = …;
module_param(use_acm, bool, 0);
MODULE_PARM_DESC(…) …;
static bool use_obex = …;
module_param(use_obex, bool, 0);
MODULE_PARM_DESC(…) …;
static unsigned n_ports = …;
module_param(n_ports, uint, 0);
MODULE_PARM_DESC(…) …;
static bool enable = …;
static int switch_gserial_enable(bool do_enable);
static int enable_set(const char *s, const struct kernel_param *kp)
{ … }
static const struct kernel_param_ops enable_ops = …;
module_param_cb(…);
static struct usb_configuration serial_config_driver = …;
static struct usb_function_instance *fi_serial[MAX_U_SERIAL_PORTS];
static struct usb_function *f_serial[MAX_U_SERIAL_PORTS];
static int serial_register_ports(struct usb_composite_dev *cdev,
struct usb_configuration *c, const char *f_name)
{ … }
static int gs_bind(struct usb_composite_dev *cdev)
{ … }
static int gs_unbind(struct usb_composite_dev *cdev)
{ … }
static struct usb_composite_driver gserial_driver = …;
static int switch_gserial_enable(bool do_enable)
{ … }
static int __init gserial_init(void)
{ … }
module_init(…) …;
static void __exit gserial_cleanup(void)
{ … }
module_exit(gserial_cleanup);