#include <linux/kernel.h>
#include <linux/tty.h>
#include <linux/tty_driver.h>
#include <linux/slab.h>
#include <linux/tty_flip.h>
#include <linux/serial.h>
#include <linux/module.h>
#include <linux/usb.h>
#include <linux/usb/serial.h>
#include <linux/uaccess.h>
#define CONTROL_RTS …
#define RESEND_CTS_STATE …
#define URB_UPPER_LIMIT …
#define DRIVER_DESC …
static const struct usb_device_id id_table[] = …;
MODULE_DEVICE_TABLE(usb, id_table);
struct opticon_private { … };
static void opticon_process_data_packet(struct usb_serial_port *port,
const unsigned char *buf, size_t len)
{ … }
static void opticon_process_status_packet(struct usb_serial_port *port,
const unsigned char *buf, size_t len)
{ … }
static void opticon_process_read_urb(struct urb *urb)
{ … }
static int send_control_msg(struct usb_serial_port *port, u8 requesttype,
u8 val)
{ … }
static int opticon_open(struct tty_struct *tty, struct usb_serial_port *port)
{ … }
static void opticon_close(struct usb_serial_port *port)
{ … }
static void opticon_write_control_callback(struct urb *urb)
{ … }
static int opticon_write(struct tty_struct *tty, struct usb_serial_port *port,
const unsigned char *buf, int count)
{ … }
static unsigned int opticon_write_room(struct tty_struct *tty)
{ … }
static unsigned int opticon_chars_in_buffer(struct tty_struct *tty)
{ … }
static int opticon_tiocmget(struct tty_struct *tty)
{ … }
static int opticon_tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear)
{ … }
static int opticon_port_probe(struct usb_serial_port *port)
{ … }
static void opticon_port_remove(struct usb_serial_port *port)
{ … }
static struct usb_serial_driver opticon_device = …;
static struct usb_serial_driver * const serial_drivers[] = …;
module_usb_serial_driver(…);
MODULE_DESCRIPTION(…);
MODULE_LICENSE(…) …;