#include <linux/module.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/mm.h>
#include <linux/mutex.h>
#include <linux/property.h>
#include <linux/spinlock.h>
#include <asm/unaligned.h>
#include <asm/byteorder.h>
#include <linux/input.h>
#include <linux/wait.h>
#include <linux/workqueue.h>
#include <linux/string.h>
#include <linux/usb.h>
#include <linux/hid.h>
#include <linux/hiddev.h>
#include <linux/hid-debug.h>
#include <linux/hidraw.h>
#include "usbhid.h"
#define DRIVER_DESC …
static unsigned int hid_mousepoll_interval;
module_param_named(mousepoll, hid_mousepoll_interval, uint, 0644);
MODULE_PARM_DESC(…) …;
static unsigned int hid_jspoll_interval;
module_param_named(jspoll, hid_jspoll_interval, uint, 0644);
MODULE_PARM_DESC(…) …;
static unsigned int hid_kbpoll_interval;
module_param_named(kbpoll, hid_kbpoll_interval, uint, 0644);
MODULE_PARM_DESC(…) …;
static unsigned int ignoreled;
module_param_named(ignoreled, ignoreled, uint, 0644);
MODULE_PARM_DESC(…) …;
static char *quirks_param[MAX_USBHID_BOOT_QUIRKS];
module_param_array_named(…);
MODULE_PARM_DESC(…) …;
static void hid_io_error(struct hid_device *hid);
static int hid_submit_out(struct hid_device *hid);
static int hid_submit_ctrl(struct hid_device *hid);
static void hid_cancel_delayed_stuff(struct usbhid_device *usbhid);
static int hid_start_in(struct hid_device *hid)
{ … }
static void hid_retry_timeout(struct timer_list *t)
{ … }
static void hid_reset(struct work_struct *work)
{ … }
static void hid_io_error(struct hid_device *hid)
{ … }
static void usbhid_mark_busy(struct usbhid_device *usbhid)
{ … }
static int usbhid_restart_out_queue(struct usbhid_device *usbhid)
{ … }
static int usbhid_restart_ctrl_queue(struct usbhid_device *usbhid)
{ … }
static void hid_irq_in(struct urb *urb)
{ … }
static int hid_submit_out(struct hid_device *hid)
{ … }
static int hid_submit_ctrl(struct hid_device *hid)
{ … }
static void hid_irq_out(struct urb *urb)
{ … }
static void hid_ctrl(struct urb *urb)
{ … }
static void __usbhid_submit_report(struct hid_device *hid, struct hid_report *report,
unsigned char dir)
{ … }
static void usbhid_submit_report(struct hid_device *hid, struct hid_report *report, unsigned char dir)
{ … }
static int usbhid_wait_io(struct hid_device *hid)
{ … }
static int hid_set_idle(struct usb_device *dev, int ifnum, int report, int idle)
{ … }
static int hid_get_class_descriptor(struct usb_device *dev, int ifnum,
unsigned char type, void *buf, int size)
{ … }
static int usbhid_open(struct hid_device *hid)
{ … }
static void usbhid_close(struct hid_device *hid)
{ … }
void usbhid_init_reports(struct hid_device *hid)
{ … }
static int hid_find_field_early(struct hid_device *hid, unsigned int page,
unsigned int hid_code, struct hid_field **pfield)
{ … }
static void usbhid_set_leds(struct hid_device *hid)
{ … }
static void hid_find_max_report(struct hid_device *hid, unsigned int type,
unsigned int *max)
{ … }
static int hid_alloc_buffers(struct usb_device *dev, struct hid_device *hid)
{ … }
static int usbhid_get_raw_report(struct hid_device *hid,
unsigned char report_number, __u8 *buf, size_t count,
unsigned char report_type)
{ … }
static int usbhid_set_raw_report(struct hid_device *hid, unsigned int reportnum,
__u8 *buf, size_t count, unsigned char rtype)
{ … }
static int usbhid_output_report(struct hid_device *hid, __u8 *buf, size_t count)
{ … }
static void hid_free_buffers(struct usb_device *dev, struct hid_device *hid)
{ … }
static int usbhid_parse(struct hid_device *hid)
{ … }
static int usbhid_start(struct hid_device *hid)
{ … }
static void usbhid_stop(struct hid_device *hid)
{ … }
static int usbhid_power(struct hid_device *hid, int lvl)
{ … }
static void usbhid_request(struct hid_device *hid, struct hid_report *rep, int reqtype)
{ … }
static int usbhid_raw_request(struct hid_device *hid, unsigned char reportnum,
__u8 *buf, size_t len, unsigned char rtype,
int reqtype)
{ … }
static int usbhid_idle(struct hid_device *hid, int report, int idle,
int reqtype)
{ … }
static bool usbhid_may_wakeup(struct hid_device *hid)
{ … }
static const struct hid_ll_driver usb_hid_driver = …;
bool hid_is_usb(const struct hid_device *hdev)
{ … }
EXPORT_SYMBOL_GPL(…);
static int usbhid_probe(struct usb_interface *intf, const struct usb_device_id *id)
{ … }
static void usbhid_disconnect(struct usb_interface *intf)
{ … }
static void hid_cancel_delayed_stuff(struct usbhid_device *usbhid)
{ … }
static void hid_cease_io(struct usbhid_device *usbhid)
{ … }
static void hid_restart_io(struct hid_device *hid)
{ … }
static int hid_pre_reset(struct usb_interface *intf)
{ … }
static int hid_post_reset(struct usb_interface *intf)
{ … }
static int hid_resume_common(struct hid_device *hid, bool driver_suspended)
{ … }
static int hid_suspend(struct usb_interface *intf, pm_message_t message)
{ … }
static int hid_resume(struct usb_interface *intf)
{ … }
static int hid_reset_resume(struct usb_interface *intf)
{ … }
static const struct usb_device_id hid_usb_ids[] = …;
MODULE_DEVICE_TABLE (usb, hid_usb_ids);
static struct usb_driver hid_driver = …;
struct usb_interface *usbhid_find_interface(int minor)
{ … }
static int __init hid_init(void)
{ … }
static void __exit hid_exit(void)
{ … }
module_init(…) …;
module_exit(hid_exit);
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…);
MODULE_LICENSE(…) …;