#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 <linux/usb.h>
#include <linux/usb/serial.h>
#define CYBERJACK_LOCAL_BUF_SIZE …
#define DRIVER_AUTHOR …
#define DRIVER_DESC …
#define CYBERJACK_VENDOR_ID …
#define CYBERJACK_PRODUCT_ID …
static int cyberjack_port_probe(struct usb_serial_port *port);
static void cyberjack_port_remove(struct usb_serial_port *port);
static int cyberjack_open(struct tty_struct *tty,
struct usb_serial_port *port);
static void cyberjack_close(struct usb_serial_port *port);
static int cyberjack_write(struct tty_struct *tty,
struct usb_serial_port *port, const unsigned char *buf, int count);
static unsigned int cyberjack_write_room(struct tty_struct *tty);
static void cyberjack_read_int_callback(struct urb *urb);
static void cyberjack_read_bulk_callback(struct urb *urb);
static void cyberjack_write_bulk_callback(struct urb *urb);
static const struct usb_device_id id_table[] = …;
MODULE_DEVICE_TABLE(usb, id_table);
static struct usb_serial_driver cyberjack_device = …;
static struct usb_serial_driver * const serial_drivers[] = …;
struct cyberjack_private { … };
static int cyberjack_port_probe(struct usb_serial_port *port)
{ … }
static void cyberjack_port_remove(struct usb_serial_port *port)
{ … }
static int cyberjack_open(struct tty_struct *tty,
struct usb_serial_port *port)
{ … }
static void cyberjack_close(struct usb_serial_port *port)
{ … }
static int cyberjack_write(struct tty_struct *tty,
struct usb_serial_port *port, const unsigned char *buf, int count)
{ … }
static unsigned int cyberjack_write_room(struct tty_struct *tty)
{ … }
static void cyberjack_read_int_callback(struct urb *urb)
{ … }
static void cyberjack_read_bulk_callback(struct urb *urb)
{ … }
static void cyberjack_write_bulk_callback(struct urb *urb)
{ … }
module_usb_serial_driver(…);
MODULE_AUTHOR(…);
MODULE_DESCRIPTION(…);
MODULE_LICENSE(…) …;