summaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-lenovo-tpkbd.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* HID: lenovo-tpkbd: remove usb dependencyBenjamin Tissoires2013-09-241-14/+6
| | | | | | | | | | lenovo tpkbd currently relies on the usb interface number to detect if it is dealing with the touchpad interface or not. As the report descriptors of the interface 0 does not contain the button 3, we can use this to remove the need to check for usb. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: lenovo-tpkbd: devm conversionBenjamin Tissoires2013-09-241-22/+8
| | | | | | | | We can use the devres API in hid modules, so use it to avoid some kfree and potential leaks. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: lenovo-tpkbd: fix leak if tpkbd_probe_tp failsBenjamin Tissoires2013-09-131-5/+10
| | | | | | | | | | | | If tpkbd_probe_tp() bails out, the probe() function return an error, but hid_hw_stop() is never called. fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1003998 Cc: stable@vger.kernel.org Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: lenovo-tpkbd: validate output report detailsKees Cook2013-09-131-1/+9
| | | | | | | | | | | | | | | | | A HID device could send a malicious output report that would cause the lenovo-tpkbd HID driver to write just beyond the output report allocation during initialization, causing a heap overflow: [ 76.109807] usb 1-1: New USB device found, idVendor=17ef, idProduct=6009 ... [ 80.462540] BUG kmalloc-192 (Tainted: G W ): Redzone overwritten CVE-2013-2894 Signed-off-by: Kees Cook <keescook@chromium.org> Cc: stable@vger.kernel.org Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
*-. Merge branches 'for-3.10/multitouch', 'for-3.10/roccat' and ↵Jiri Kosina2013-04-301-2/+0
|\ \ | | | | | | | | | | | | | | | | | | 'for-3.10/upstream' into for-linus Conflicts: drivers/hid/Kconfig
| | * HID: hid-lenovo-tpkbd: remove doubled hid_get_drvdataJiri Slaby2013-04-051-2/+0
| |/ | | | | | | | | | | | | | | | | In pointer_press_speed_show, we do data_pointer = hid_get_drvdata(hdev); twice in a row. Remove one of those. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* / HID: use hid_hw_request() instead of direct call to usbhidBenjamin Tissoires2013-02-251-2/+2
|/ | | | | | | | | | | | | | | | | | | This allows the hid drivers to be independent from the transport layer. The patch was constructed by replacing all occurences of usbhid_submit_report() by its hid_hw_request() counterpart. Then, drivers not requiring USB_HID anymore have their USB_HID dependency cleaned in the Kconfig file. Finally, few drivers still depends on USB_HID. Many of them are requiring the io wait callback. They are found in the next patch. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> For the sensor-hub part: Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: Use module_hid_driver macroH Hartley Sweeten2013-01-031-13/+1
| | | | | | | | | | | | Use the new module_hid_driver macro in all HID drivers that have a simple register/unregister init/exit. This also converts the hid drivers that test for a failure of hid_register_driver() and report the failure. Using module_hid_driver in those drivers removes the failure message. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* Merge branch 'upstream' into for-linusJiri Kosina2012-10-011-114/+33
|\ | | | | | | | | Conflicts: drivers/hid/usbhid/hid-quirks.c
| * HID: lenovo-tpkbd: Remove unnecessary casts of void pointersAxel Lin2012-09-171-114/+33
| | | | | | | | | | | | | | container_of() never returns NULL, thus also remove the NULL checking for it. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | HID: lenovo-tpkbd: Fix memory leak in tpkbd_remove_tp()Axel Lin2012-09-221-0/+2
|/ | | | | | | | We need to kfree names for led_mute and led_micmute in tpkbd_remove_tp(). Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Bernhard Seibold <mail@bernhard-seibold.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: Driver for Lenovo Keyboard with TrackpointBernhard Seibold2012-06-081-0/+564
This driver for the "Lenovo ThinkPad USB Keyboard with Trackpoint" supports setting various device attributes, controlling mute and microphone mute LEDs and enables use of the microphone mute key. Signed-off-by: Bernhard Seibold <mail@bernhard-seibold.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>