On Mon, Apr 01, 2002 at 04:55:46PM -0800, Greg KH wrote:
> On Mon, Apr 01, 2002 at 04:45:20PM -0800, Greg KH wrote:
> >
> > Ok, here's a patch that does it.
>
> That patch was for 2.5, here's one for 2.4:
Yes, both of them are OK. Thanks.
>
> thanks,
>
> greg k-h
>
>
> diff -Nru a/drivers/usb/hid-core.c b/drivers/usb/hid-core.c
> --- a/drivers/usb/hid-core.c Mon Apr 1 16:54:29 2002
> +++ b/drivers/usb/hid-core.c Mon Apr 1 16:54:29 2002
> @@ -47,9 +47,7 @@
> #include <linux/usb.h>
>
> #include "hid.h"
> -#ifdef CONFIG_USB_HIDDEV
> #include <linux/hiddev.h>
> -#endif
>
> /*
> * Version Information
> @@ -737,10 +735,8 @@
> hid_dump_input(usage, value);
> if (hid->claimed & HID_CLAIMED_INPUT)
> hidinput_hid_event(hid, field, usage, value);
> -#ifdef CONFIG_USB_HIDDEV
> if (hid->claimed & HID_CLAIMED_HIDDEV)
> hiddev_hid_event(hid, usage->hid, value);
> -#endif
> }
>
>
> @@ -1241,10 +1237,8 @@
>
> if (!hidinput_connect(hid))
> hid->claimed |= HID_CLAIMED_INPUT;
> -#ifdef CONFIG_USB_HIDDEV
> if (!hiddev_connect(hid))
> hid->claimed |= HID_CLAIMED_HIDDEV;
> -#endif
> printk(KERN_INFO);
>
> if (hid->claimed & HID_CLAIMED_INPUT)
> @@ -1276,10 +1270,8 @@
> usb_unlink_urb(&hid->urb);
> if (hid->claimed & HID_CLAIMED_INPUT)
> hidinput_disconnect(hid);
> -#ifdef CONFIG_USB_HIDDEV
> if (hid->claimed & HID_CLAIMED_HIDDEV)
> hiddev_disconnect(hid);
> -#endif
> hid_free_device(hid);
> }
>
> @@ -1300,9 +1292,7 @@
>
> static int __init hid_init(void)
> {
> -#ifdef CONFIG_USB_HIDDEV
> hiddev_init();
> -#endif
> usb_register(&hid_driver);
> info(DRIVER_VERSION " " DRIVER_AUTHOR);
> info(DRIVER_DESC);
> @@ -1312,9 +1302,7 @@
>
> static void __exit hid_exit(void)
> {
> -#ifdef CONFIG_USB_HIDDEV
> hiddev_exit();
> -#endif
> usb_deregister(&hid_driver);
> }
>
> diff -Nru a/include/linux/hiddev.h b/include/linux/hiddev.h
> --- a/include/linux/hiddev.h Mon Apr 1 16:54:29 2002
> +++ b/include/linux/hiddev.h Mon Apr 1 16:54:29 2002
> @@ -185,7 +185,7 @@
> #else
> static inline void *hiddev_connect(struct hid_device *hid) { return NULL; }
> static inline void hiddev_disconnect(struct hid_device *hid) { }
> -static inline void hiddev_event(struct hid_device *hid, unsigned int usage, int
>value) { }
> +static inline void hiddev_hid_event(struct hid_device *hid, unsigned int usage, int
>value) { }
> static inline int hiddev_init(void) { return 0; }
> static inline void hiddev_exit(void) { }
> #endif
--
Vojtech Pavlik
SuSE Labs
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel