#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 KP_RETRIES …
#define DRIVER_AUTHOR …
#define DRIVER_DESC …
static int connect_retries = …;
static int initial_wait;
static int ipaq_open(struct tty_struct *tty,
struct usb_serial_port *port);
static int ipaq_calc_num_ports(struct usb_serial *serial,
struct usb_serial_endpoints *epds);
static int ipaq_startup(struct usb_serial *serial);
static const struct usb_device_id ipaq_id_table[] = …;
MODULE_DEVICE_TABLE(usb, ipaq_id_table);
static struct usb_serial_driver ipaq_device = …;
static struct usb_serial_driver * const serial_drivers[] = …;
static int ipaq_open(struct tty_struct *tty,
struct usb_serial_port *port)
{ … }
static int ipaq_calc_num_ports(struct usb_serial *serial,
struct usb_serial_endpoints *epds)
{ … }
static int ipaq_startup(struct usb_serial *serial)
{ … }
module_usb_serial_driver(…);
MODULE_AUTHOR(…);
MODULE_DESCRIPTION(…);
MODULE_LICENSE(…) …;
module_param(connect_retries, int, 0644);
MODULE_PARM_DESC(…) …;
module_param(initial_wait, int, 0644);
MODULE_PARM_DESC(…) …;