#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/tty.h>
#include <linux/tty_driver.h>
#include <linux/tty_flip.h>
#include <linux/serial.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/spinlock.h>
#include <linux/usb.h>
#include <linux/usb/serial.h>
#include <linux/uaccess.h>
#include <linux/kfifo.h>
#include "oti6858.h"
#define OTI6858_DESCRIPTION …
#define OTI6858_AUTHOR …
static const struct usb_device_id id_table[] = …;
MODULE_DEVICE_TABLE(usb, id_table);
#define OTI6858_REQ_GET_STATUS …
#define OTI6858_REQ_T_GET_STATUS …
#define OTI6858_REQ_SET_LINE …
#define OTI6858_REQ_T_SET_LINE …
#define OTI6858_REQ_CHECK_TXBUFF …
#define OTI6858_REQ_T_CHECK_TXBUFF …
struct oti6858_control_pkt { … };
#define OTI6858_CTRL_PKT_SIZE …
#define OTI6858_CTRL_EQUALS_PENDING(a, priv) …
static int oti6858_open(struct tty_struct *tty, struct usb_serial_port *port);
static void oti6858_close(struct usb_serial_port *port);
static void oti6858_set_termios(struct tty_struct *tty,
struct usb_serial_port *port,
const struct ktermios *old_termios);
static void oti6858_init_termios(struct tty_struct *tty);
static void oti6858_read_int_callback(struct urb *urb);
static void oti6858_read_bulk_callback(struct urb *urb);
static void oti6858_write_bulk_callback(struct urb *urb);
static int oti6858_write(struct tty_struct *tty, struct usb_serial_port *port,
const unsigned char *buf, int count);
static unsigned int oti6858_write_room(struct tty_struct *tty);
static unsigned int oti6858_chars_in_buffer(struct tty_struct *tty);
static int oti6858_tiocmget(struct tty_struct *tty);
static int oti6858_tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear);
static int oti6858_port_probe(struct usb_serial_port *port);
static void oti6858_port_remove(struct usb_serial_port *port);
static struct usb_serial_driver oti6858_device = …;
static struct usb_serial_driver * const serial_drivers[] = …;
struct oti6858_private { … };
static void setup_line(struct work_struct *work)
{ … }
static void send_data(struct work_struct *work)
{ … }
static int oti6858_port_probe(struct usb_serial_port *port)
{ … }
static void oti6858_port_remove(struct usb_serial_port *port)
{ … }
static int oti6858_write(struct tty_struct *tty, struct usb_serial_port *port,
const unsigned char *buf, int count)
{ … }
static unsigned int oti6858_write_room(struct tty_struct *tty)
{ … }
static unsigned int oti6858_chars_in_buffer(struct tty_struct *tty)
{ … }
static void oti6858_init_termios(struct tty_struct *tty)
{ … }
static void oti6858_set_termios(struct tty_struct *tty,
struct usb_serial_port *port,
const struct ktermios *old_termios)
{ … }
static int oti6858_open(struct tty_struct *tty, struct usb_serial_port *port)
{ … }
static void oti6858_close(struct usb_serial_port *port)
{ … }
static int oti6858_tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear)
{ … }
static int oti6858_tiocmget(struct tty_struct *tty)
{ … }
static void oti6858_read_int_callback(struct urb *urb)
{ … }
static void oti6858_read_bulk_callback(struct urb *urb)
{ … }
static void oti6858_write_bulk_callback(struct urb *urb)
{ … }
module_usb_serial_driver(…);
MODULE_DESCRIPTION(…);
MODULE_AUTHOR(…);
MODULE_LICENSE(…) …;