#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/gameport.h>
#include <linux/input.h>
#include <linux/jiffies.h>
#define DRIVER_DESC …
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…);
MODULE_LICENSE(…) …;
#define COBRA_MAX_STROBE …
#define COBRA_LENGTH …
static int cobra_btn[] = …;
struct cobra { … };
static unsigned char cobra_read_packet(struct gameport *gameport, unsigned int *data)
{ … }
static void cobra_poll(struct gameport *gameport)
{ … }
static int cobra_open(struct input_dev *dev)
{ … }
static void cobra_close(struct input_dev *dev)
{ … }
static int cobra_connect(struct gameport *gameport, struct gameport_driver *drv)
{ … }
static void cobra_disconnect(struct gameport *gameport)
{ … }
static struct gameport_driver cobra_drv = …;
module_gameport_driver(…) …;