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 @@ ...@@ -46,9 +46,7 @@
#include <linux/usb.h> #include <linux/usb.h>
#include "hid.h" #include "hid.h"
#ifdef CONFIG_USB_HIDDEV
#include <linux/hiddev.h> #include <linux/hiddev.h>
#endif
/* /*
* Version Information * Version Information
...@@ -1441,10 +1439,8 @@ static void* hid_probe(struct usb_device *dev, unsigned int ifnum, ...@@ -1441,10 +1439,8 @@ static void* hid_probe(struct usb_device *dev, unsigned int ifnum,
if (!hidinput_connect(hid)) if (!hidinput_connect(hid))
hid->claimed |= HID_CLAIMED_INPUT; hid->claimed |= HID_CLAIMED_INPUT;
#ifdef CONFIG_USB_HIDDEV
if (!hiddev_connect(hid)) if (!hiddev_connect(hid))
hid->claimed |= HID_CLAIMED_HIDDEV; hid->claimed |= HID_CLAIMED_HIDDEV;
#endif
if (!hid->claimed) { if (!hid->claimed) {
hid_free_device(hid); hid_free_device(hid);
...@@ -1483,13 +1479,10 @@ static void hid_disconnect(struct usb_device *dev, void *ptr) ...@@ -1483,13 +1479,10 @@ static void hid_disconnect(struct usb_device *dev, void *ptr)
usb_unlink_urb(hid->urbout); usb_unlink_urb(hid->urbout);
usb_unlink_urb(hid->urbctrl); usb_unlink_urb(hid->urbctrl);
if (hid->claimed & HID_CLAIMED_INPUT) if (hid->claimed & HID_CLAIMED_INPUT)
hidinput_disconnect(hid); hidinput_disconnect(hid);
#ifdef CONFIG_USB_HIDDEV
if (hid->claimed & HID_CLAIMED_HIDDEV) if (hid->claimed & HID_CLAIMED_HIDDEV)
hiddev_disconnect(hid); hiddev_disconnect(hid);
#endif
usb_free_urb(hid->urbin); usb_free_urb(hid->urbin);
usb_free_urb(hid->urbctrl); usb_free_urb(hid->urbctrl);
...@@ -1516,9 +1509,7 @@ static struct usb_driver hid_driver = { ...@@ -1516,9 +1509,7 @@ static struct usb_driver hid_driver = {
static int __init hid_init(void) static int __init hid_init(void)
{ {
#ifdef CONFIG_USB_HIDDEV
hiddev_init(); hiddev_init();
#endif
usb_register(&hid_driver); usb_register(&hid_driver);
info(DRIVER_VERSION ":" DRIVER_DESC); info(DRIVER_VERSION ":" DRIVER_DESC);
...@@ -1527,9 +1518,7 @@ static int __init hid_init(void) ...@@ -1527,9 +1518,7 @@ static int __init hid_init(void)
static void __exit hid_exit(void) static void __exit hid_exit(void)
{ {
#ifdef CONFIG_USB_HIDDEV
hiddev_exit(); hiddev_exit();
#endif
usb_deregister(&hid_driver); usb_deregister(&hid_driver);
} }
......
...@@ -389,10 +389,6 @@ struct hid_descriptor { ...@@ -389,10 +389,6 @@ struct hid_descriptor {
struct hid_class_descriptor desc[1]; struct hid_class_descriptor desc[1];
} __attribute__ ((packed)); } __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 #ifdef DEBUG
#include "hid-debug.h" #include "hid-debug.h"
#else #else
...@@ -403,9 +399,19 @@ void hidinput_disconnect(struct hid_device *); ...@@ -403,9 +399,19 @@ void hidinput_disconnect(struct hid_device *);
#endif #endif
#ifdef CONFIG_USB_HIDINPUT
/* Applications from HID Usage Tables 4/8/99 Version 1.1 */ /* Applications from HID Usage Tables 4/8/99 Version 1.1 */
/* We ignore a few input applications that are not widely used */ /* We ignore a few input applications that are not widely used */
#define IS_INPUT_APPLICATION(a) (((a >= 0x00010000) && (a <= 0x00010008)) || ( a == 0x00010080) || ( a == 0x000c0001)) #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 *); int hid_open(struct hid_device *);
void hid_close(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