#include <linux/kernel.h>
#include <linux/platform_device.h>
#include <linux/list.h>
#include <linux/module.h>
#include <linux/usb/composite.h>
#include <linux/usb/g_hid.h>
#define DRIVER_DESC …
#define DRIVER_VERSION …
#include "u_hid.h"
#define HIDG_VENDOR_NUM …
#define HIDG_PRODUCT_NUM …
struct hidg_func_node { … };
static LIST_HEAD(hidg_func_list);
USB_GADGET_COMPOSITE_OPTIONS(…);
static struct usb_device_descriptor device_desc = …;
static const struct usb_descriptor_header *otg_desc[2];
static struct usb_string strings_dev[] = …;
static struct usb_gadget_strings stringtab_dev = …;
static struct usb_gadget_strings *dev_strings[] = …;
static int do_config(struct usb_configuration *c)
{ … }
static struct usb_configuration config_driver = …;
static int hid_bind(struct usb_composite_dev *cdev)
{ … }
static int hid_unbind(struct usb_composite_dev *cdev)
{ … }
static int hidg_plat_driver_probe(struct platform_device *pdev)
{ … }
static void hidg_plat_driver_remove(struct platform_device *pdev)
{ … }
static struct usb_composite_driver hidg_driver = …;
static struct platform_driver hidg_plat_driver = …;
MODULE_DESCRIPTION(…);
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
static int __init hidg_init(void)
{ … }
module_init(…) …;
static void __exit hidg_cleanup(void)
{ … }
module_exit(hidg_cleanup);