#include <linux/hid.h>
#include <linux/module.h>
#include <linux/printk.h>
#include "hid-ids.h"
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_INFO(…) …;
static bool g6_is_space = …;
MODULE_PARM_DESC(…) …;
#define COUGAR_VENDOR_USAGE …
#define COUGAR_FIELD_CODE …
#define COUGAR_FIELD_ACTION …
#define COUGAR_KEY_G1 …
#define COUGAR_KEY_G2 …
#define COUGAR_KEY_G3 …
#define COUGAR_KEY_G4 …
#define COUGAR_KEY_G5 …
#define COUGAR_KEY_G6 …
#define COUGAR_KEY_FN …
#define COUGAR_KEY_MR …
#define COUGAR_KEY_M1 …
#define COUGAR_KEY_M2 …
#define COUGAR_KEY_M3 …
#define COUGAR_KEY_LEDS …
#define COUGAR_KEY_LOCK …
static unsigned char cougar_mapping[][2] = …;
struct cougar_shared { … };
struct cougar { … };
static LIST_HEAD(cougar_udev_list);
static DEFINE_MUTEX(cougar_udev_list_lock);
static void cougar_fix_g6_mapping(void)
{ … }
static __u8 *cougar_report_fixup(struct hid_device *hdev, __u8 *rdesc,
unsigned int *rsize)
{ … }
static struct cougar_shared *cougar_get_shared_data(struct hid_device *hdev)
{ … }
static void cougar_release_shared_data(struct kref *kref)
{ … }
static void cougar_remove_shared_data(void *resource)
{ … }
static int cougar_bind_shared_data(struct hid_device *hdev,
struct cougar *cougar)
{ … }
static int cougar_probe(struct hid_device *hdev,
const struct hid_device_id *id)
{ … }
static int cougar_raw_event(struct hid_device *hdev, struct hid_report *report,
u8 *data, int size)
{ … }
static void cougar_remove(struct hid_device *hdev)
{ … }
static int cougar_param_set_g6_is_space(const char *val,
const struct kernel_param *kp)
{ … }
static const struct kernel_param_ops cougar_g6_is_space_ops = …;
module_param_cb(…);
static const struct hid_device_id cougar_id_table[] = …;
MODULE_DEVICE_TABLE(hid, cougar_id_table);
static struct hid_driver cougar_driver = …;
module_hid_driver(…) …;