# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.576 -> 1.577 # drivers/usb/hid.h 1.11 -> 1.12 # drivers/usb/hid-core.c 1.18 -> 1.19 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 02/04/03 greg@kroah.com 1.577 # USB HID driver # # removed CONFIG_USB_HIDDEV #ifdefs in the driver. # -------------------------------------------- # diff -Nru a/drivers/usb/hid-core.c b/drivers/usb/hid-core.c --- a/drivers/usb/hid-core.c Wed Apr 3 16:39:10 2002 +++ b/drivers/usb/hid-core.c Wed Apr 3 16:39:10 2002 @@ -46,9 +46,7 @@ #include #include "hid.h" -#ifdef CONFIG_USB_HIDDEV #include -#endif /* * Version Information @@ -1441,10 +1439,8 @@ 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 @@ 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 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 void __exit hid_exit(void) { -#ifdef CONFIG_USB_HIDDEV hiddev_exit(); -#endif usb_deregister(&hid_driver); } diff -Nru a/drivers/usb/hid.h b/drivers/usb/hid.h --- a/drivers/usb/hid.h Wed Apr 3 16:39:10 2002 +++ b/drivers/usb/hid.h Wed Apr 3 16:39:10 2002 @@ -389,10 +389,6 @@ 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 @@ #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 *);