#define pr_fmt(fmt) …
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/usb.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/tty.h>
#include <linux/tty_driver.h>
#include <linux/tty_flip.h>
#include <linux/slab.h>
#include <linux/usb/cdc.h>
#include "gdm_mux.h"
static u16 packet_type_for_tty_index[TTY_MAX_COUNT] = …;
#define USB_DEVICE_CDC_DATA(vid, pid) …
static const struct usb_device_id id_table[] = …;
MODULE_DEVICE_TABLE(…);
static int packet_type_to_tty_index(u16 packet_type)
{ … }
static struct mux_tx *alloc_mux_tx(int len)
{ … }
static void free_mux_tx(struct mux_tx *t)
{ … }
static struct mux_rx *alloc_mux_rx(void)
{ … }
static void free_mux_rx(struct mux_rx *r)
{ … }
static struct mux_rx *get_rx_struct(struct rx_cxt *rx)
{ … }
static void put_rx_struct(struct rx_cxt *rx, struct mux_rx *r)
{ … }
static int up_to_host(struct mux_rx *r)
{ … }
static void do_rx(struct work_struct *work)
{ … }
static void remove_rx_submit_list(struct mux_rx *r, struct rx_cxt *rx)
{ … }
static void gdm_mux_rcv_complete(struct urb *urb)
{ … }
static int gdm_mux_recv(void *priv_dev,
int (*cb)(void *data, int len, int tty_index,
struct tty_dev *tty_dev, int complete))
{ … }
static void gdm_mux_send_complete(struct urb *urb)
{ … }
static int gdm_mux_send(void *priv_dev, void *data, int len, int tty_index,
void (*cb)(void *data), void *cb_data)
{ … }
static int gdm_mux_send_control(void *priv_dev, int request, int value,
void *buf, int len)
{ … }
static void release_usb(struct mux_dev *mux_dev)
{ … }
static int init_usb(struct mux_dev *mux_dev)
{ … }
static int gdm_mux_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{ … }
static void gdm_mux_disconnect(struct usb_interface *intf)
{ … }
static int gdm_mux_suspend(struct usb_interface *intf, pm_message_t pm_msg)
{ … }
static int gdm_mux_resume(struct usb_interface *intf)
{ … }
static struct usb_driver gdm_mux_driver = …;
static int __init gdm_usb_mux_init(void)
{ … }
static void __exit gdm_usb_mux_exit(void)
{ … }
module_init(gdm_usb_mux_init);
module_exit(gdm_usb_mux_exit);
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;