Commit Graph

10 Commits

Author SHA1 Message Date
Jiri Kosina 767fe7877c HID: fix memleaking of collection
hid_free_device() doesn't free device->collection (but it does
free device->rdesc and device itself). This imposes memory leak.
Fix it.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-01-25 18:31:21 +01:00
Jiri Kosina e54dea69ba HID: compilation fix when DEBUG_DATA is defined
hid/hid-core.c references 'len' variable when DEBUG_DATA is defined,
but the actual name of the variable is 'size'. Fix it.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-01-21 22:17:55 +01:00
Simon Budig d4ae650a90 HID: proper LED-mapping for SpaceNavigator
This change introduces a mapping for LED indicators between the HID
specification and the Linux input subsystem. The previous code properly
mapped the LEDs relevant for Keyboards, but garbeled the remaining ones.
With this change all LED enums from the input system get mapped to more
or less equivalent LED numbers from the HID specification.

This patch also ensures that the unused bits in a HID report to the
device are zeroed out. This makes the 3Dconnexion SpaceNavigator fully
usable with the linux input system.

Signed-off-by: Simon Budig <simon@budig.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-01-21 22:17:53 +01:00
Jiri Kosina 5314980131 HID: Fix DRIVER_DESC macro
DRIVER_DESC macro is wrong in drivers/hid/hid-core.c. Its value
is legacy from original usb+hid code and clashes with current
usbhid implementation. Fix it.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-01-09 13:24:25 +01:00
Jiri Kosina 4d503ecc86 HID: mousepoll parameter makes no sense for generic HID
mousepoll parameter makes no sense for generic HID code. It
belongs to (and is implemented by) usbhid. This is also where
all users are expecting it.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-01-08 16:05:26 +01:00
Ahmed S. Darwish d6509c36ba HID: tiny patch to remove a kmalloc cast
Remove unnecessary cast.

Signed-off-by: Ahmed Darwish <darwish.07@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-01-08 16:05:24 +01:00
Jiri Kosina aa8de2f038 [PATCH] Generic HID layer - input and event reporting
hid_input_report() was needlessly USB-specific in USB HID. This patch
makes the function independent of HID implementation and fixes all
the current users. Bluetooth patches comply with this prototype.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-08 10:43:17 -08:00
Jiri Kosina aa938f7974 [PATCH] Generic HID layer - hiddev
- hiddev is USB-only (agreed with Marcel Holtmann that Bluetooth currently
  doesn't need it, and future planned interface (rawhid) will be more flexible
  and usable)
- both HID and USB-hid can be now compiled as modules (wasn't possible before
  hiddev was fully separated from generic HID layer)

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-08 10:43:15 -08:00
Jiri Kosina 229695e51e [PATCH] Generic HID layer - API
- fixed generic API (added neccessary EXPORT_SYMBOL, fixed hid.h to provide correct
  prototypes)
- extended hid_device with open/close/event function pointers to driver-specific
  functions
- added driver specific driver_data to hid_device

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-08 10:43:12 -08:00
Jiri Kosina dde5845a52 [PATCH] Generic HID layer - code split
The "big main" split of USB HID code into generic HID code and
USB-transport specific HID handling.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-08 10:43:01 -08:00