#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/module.h>
#include <linux/spinlock.h>
#include <linux/uaccess.h>
#include <asm/unaligned.h>
#include <linux/usb.h>
#include <linux/usb/serial.h>
#include <linux/serial.h>
#include "mct_u232.h"
#define DRIVER_AUTHOR …
#define DRIVER_DESC …
static int mct_u232_port_probe(struct usb_serial_port *port);
static void mct_u232_port_remove(struct usb_serial_port *remove);
static int mct_u232_open(struct tty_struct *tty, struct usb_serial_port *port);
static void mct_u232_close(struct usb_serial_port *port);
static void mct_u232_dtr_rts(struct usb_serial_port *port, int on);
static void mct_u232_read_int_callback(struct urb *urb);
static void mct_u232_set_termios(struct tty_struct *tty,
struct usb_serial_port *port,
const struct ktermios *old_termios);
static int mct_u232_break_ctl(struct tty_struct *tty, int break_state);
static int mct_u232_tiocmget(struct tty_struct *tty);
static int mct_u232_tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear);
static void mct_u232_throttle(struct tty_struct *tty);
static void mct_u232_unthrottle(struct tty_struct *tty);
static const struct usb_device_id id_table[] = …;
MODULE_DEVICE_TABLE(usb, id_table);
static struct usb_serial_driver mct_u232_device = …;
static struct usb_serial_driver * const serial_drivers[] = …;
struct mct_u232_private { … };
#define THROTTLED …
#define WDR_TIMEOUT …
static int mct_u232_calculate_baud_rate(struct usb_serial *serial,
speed_t value, speed_t *result)
{ … }
static int mct_u232_set_baud_rate(struct tty_struct *tty,
struct usb_serial *serial, struct usb_serial_port *port, speed_t value)
{ … }
static int mct_u232_set_line_ctrl(struct usb_serial_port *port,
unsigned char lcr)
{ … }
static int mct_u232_set_modem_ctrl(struct usb_serial_port *port,
unsigned int control_state)
{ … }
static int mct_u232_get_modem_stat(struct usb_serial_port *port,
unsigned char *msr)
{ … }
static void mct_u232_msr_to_icount(struct async_icount *icount,
unsigned char msr)
{ … }
static void mct_u232_msr_to_state(struct usb_serial_port *port,
unsigned int *control_state, unsigned char msr)
{ … }
static int mct_u232_port_probe(struct usb_serial_port *port)
{ … }
static void mct_u232_port_remove(struct usb_serial_port *port)
{ … }
static int mct_u232_open(struct tty_struct *tty, struct usb_serial_port *port)
{ … }
static void mct_u232_dtr_rts(struct usb_serial_port *port, int on)
{ … }
static void mct_u232_close(struct usb_serial_port *port)
{ … }
static void mct_u232_read_int_callback(struct urb *urb)
{ … }
static void mct_u232_set_termios(struct tty_struct *tty,
struct usb_serial_port *port,
const struct ktermios *old_termios)
{ … }
static int mct_u232_break_ctl(struct tty_struct *tty, int break_state)
{ … }
static int mct_u232_tiocmget(struct tty_struct *tty)
{ … }
static int mct_u232_tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear)
{ … }
static void mct_u232_throttle(struct tty_struct *tty)
{ … }
static void mct_u232_unthrottle(struct tty_struct *tty)
{ … }
module_usb_serial_driver(…);
MODULE_AUTHOR(…);
MODULE_DESCRIPTION(…);
MODULE_LICENSE(…) …;