Commit e027fe1c authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

USB HID driver

removed CONFIG_USB_HIDDEV #ifdefs in the driver.
parent a8e08249
......@@ -46,9 +46,7 @@
#include <linux/usb.h>
#include "hid.h"
#ifdef CONFIG_USB_HIDDEV
#include <linux/hiddev.h>
#endif
/*
* Version Information
......@@ -1441,10 +1439,8 @@ static void* hid_probe(struct usb_device *dev, unsigned int ifnum,
if (!hidinput_connect(hid))
hid->claimed |= HID_CLAIMED_INPUT;
#ifdef CONFIG_USB_HIDDEV
if (!hiddev_connect(hid))
hid->claimed |= HID_CLAIMED_HIDDEV;
#endif
if (!hid->claimed) {
hid_free_device(hid);
......@@ -1483,13 +1479,10 @@ static void hid_disconnect(struct usb_device *dev, void *ptr)
usb_unlink_urb(hid->urbout);
usb_unlink_urb(hid->urbctrl);
if (hid->claimed & HID_CLAIMED_INPUT)
hidinput_disconnect(hid);
#ifdef CONFIG_USB_HIDDEV
if (hid->claimed & HID_CLAIMED_HIDDEV)
hiddev_disconnect(hid);
#endif
usb_free_urb(hid->urbin);
usb_free_urb(hid->urbctrl);
......@@ -1516,9 +1509,7 @@ static struct usb_driver hid_driver = {
static int __init hid_init(void)
{
#ifdef CONFIG_USB_HIDDEV
hiddev_init();
#endif
usb_register(&hid_driver);
info(DRIVER_VERSION ":" DRIVER_DESC);
......@@ -1527,9 +1518,7 @@ static int __init hid_init(void)
static void __exit hid_exit(void)
{
#ifdef CONFIG_USB_HIDDEV
hiddev_exit();
#endif
usb_deregister(&hid_driver);
}
......
......@@ -389,10 +389,6 @@ struct hid_descriptor {
struct hid_class_descriptor desc[1];
} __attribute__ ((packed));
void hidinput_hid_event(struct hid_device *, struct hid_field *, struct hid_usage *, __s32);
int hidinput_connect(struct hid_device *);
void hidinput_disconnect(struct hid_device *);
#ifdef DEBUG
#include "hid-debug.h"
#else
......@@ -403,9 +399,19 @@ void hidinput_disconnect(struct hid_device *);
#endif
#ifdef CONFIG_USB_HIDINPUT
/* Applications from HID Usage Tables 4/8/99 Version 1.1 */
/* We ignore a few input applications that are not widely used */
#define IS_INPUT_APPLICATION(a) (((a >= 0x00010000) && (a <= 0x00010008)) || ( a == 0x00010080) || ( a == 0x000c0001))
extern void hidinput_hid_event(struct hid_device *, struct hid_field *, struct hid_usage *, __s32);
extern int hidinput_connect(struct hid_device *);
extern void hidinput_disconnect(struct hid_device *);
#else
#define IS_INPUT_APPLICATION(a) (0)
static inline void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct hid_usage *usage, __s32 value) { }
static inline int hidinput_connect(struct hid_device *hid) { return -ENODEV; }
static inline void hidinput_disconnect(struct hid_device *hid) { }
#endif
int hid_open(struct hid_device *);
void hid_close(struct hid_device *);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment