Bug 16351
Summary: | Various issues with imon remote control driver | ||
---|---|---|---|
Product: | Drivers | Reporter: | Anssi Hannula (anssi.hannula) |
Component: | Input Devices | Assignee: | Jarod Wilson (jarod) |
Status: | CLOSED CODE_FIX | ||
Severity: | normal | CC: | drivers_input-devices, florian, jarod |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 2.6.35-rc4 | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: | Patch to address a number of issues raised here |
Description
Anssi Hannula
2010-07-07 17:13:52 UTC
Additional bits from ml thread: BTW, I wonder if we should also disable kernel autorepeat and use the remote control's own repeat signals instead? Then extra repeat codes would not not emitted if the release signal is missed. Some additional issues pointed out by Dmitry Torokhov: Random notes about irmon: imon_init_idev(): memcpy(&ir->dev, ictx->dev, sizeof(struct device)); This is... scary. Devices are refcounted and if you copy them around all hell may break loose. On an unrelated note you do not need memcpy to copy a structire, *it->dev = *ictx->dev will do. imon_init_idev(), imon_init_touch(): - consizer returning proper error codes via ERR_PTR() and check wit IS_ERR(). Created attachment 29852 [details]
Patch to address a number of issues raised here
I think this patch handles the bulk of the issues reported here. This is still a bit of a work-in-progress though, as I'm also looking to incorporate some changes from David Hardeman to split the mouse/panel keys from the remote keys in preparation for some further ir-core interface abstraction work he's doing.
David's patch actually converts the imon driver over to using more native ir-core functionality, which actually addresses the key release issues better, in addition to fixing the repeat issue when the dpad is in keyboard mode. I've got a follow-up patch that adds some locking around access to ictx->kc and ictx->last_keycode, and with that, I think we've got just about everything here licked... Will be posted to linux-media list shortly. fixed in .37-rc1: commit 693508df9824ecc2bf308a35b58159aa2fecf91f Author: Jarod Wilson <jarod@redhat.com> Date: Wed Sep 15 15:56:03 2010 -0300 V4L/DVB: IR/imon: protect ictx's kc and last_keycode w/spinlock |