#include <linux/delay.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/input.h>
#include <linux/gameport.h>
#include <linux/jiffies.h>
#define DRIVER_DESC …
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…);
MODULE_LICENSE(…) …;
#define GF2K_START …
#define GF2K_STROBE …
#define GF2K_TIMEOUT …
#define GF2K_LENGTH …
#define GF2K_ID_G09 …
#define GF2K_ID_F30D …
#define GF2K_ID_F30 …
#define GF2K_ID_F31D …
#define GF2K_ID_F305 …
#define GF2K_ID_F23P …
#define GF2K_ID_F31 …
#define GF2K_ID_MAX …
static char gf2k_length[] = …;
static char gf2k_hat_to_axis[][2] = …;
static char *gf2k_names[] = …;
static unsigned char gf2k_hats[] = …;
static unsigned char gf2k_axes[] = …;
static unsigned char gf2k_joys[] = …;
static unsigned char gf2k_pads[] = …;
static unsigned char gf2k_lens[] = …;
static unsigned char gf2k_abs[] = …;
static short gf2k_btn_joy[] = …;
static short gf2k_btn_pad[] = …;
static short gf2k_seq_reset[] = …;
static short gf2k_seq_digital[] = …;
struct gf2k { … };
static int gf2k_read_packet(struct gameport *gameport, int length, char *data)
{ … }
static void gf2k_trigger_seq(struct gameport *gameport, short *seq)
{ … }
#define GB(p,n,s) …
static int gf2k_get_bits(unsigned char *buf, int pos, int num, int shift)
{ … }
static void gf2k_read(struct gf2k *gf2k, unsigned char *data)
{ … }
static void gf2k_poll(struct gameport *gameport)
{ … }
static int gf2k_open(struct input_dev *dev)
{ … }
static void gf2k_close(struct input_dev *dev)
{ … }
static int gf2k_connect(struct gameport *gameport, struct gameport_driver *drv)
{ … }
static void gf2k_disconnect(struct gameport *gameport)
{ … }
static struct gameport_driver gf2k_drv = …;
module_gameport_driver(…) …;