Re: [RFC/RFT 1/5] Input: implement proper locking in input core

2007-07-29 Thread Indan Zupancic
On Sun, July 29, 2007 05:50, Dmitry Torokhov wrote: Hi Indan, On Friday 27 July 2007 19:28, Indan Zupancic wrote: Hi, Not real feedback, just some nitpicks. On Tue, July 24, 2007 06:45, Dmitry Torokhov wrote: +static int input_defuzz_abs_event(int value, int old_val, int fuzz) +{ +

[RFC/RFT 1/5] Input: implement proper locking in input core

2007-07-23 Thread Dmitry Torokhov
Input: implement proper locking in input core Also add some kerneldoc documentation to input.h Signed-off-by: Dmitry Torokhov [EMAIL PROTECTED] --- drivers/input/input.c | 656 -- include/linux/input.h | 112 +++- 2 files changed, 585

Re: [RFC/RFT 1/5] Input: implement proper locking in input core

2007-07-23 Thread Jeff Garzik
Dmitry Torokhov wrote: +static void input_repeat_key(unsigned long data) +{ + struct input_dev *dev = (void *) data; - change_bit(code, dev-key); + spin_lock_irq(dev-event_lock); [...] +void input_inject_event(struct input_handle *handle, + unsigned int

Re: [RFC/RFT 1/5] Input: implement proper locking in input core

2007-07-23 Thread Dmitry Torokhov
Hi Jeff, On Tuesday 24 July 2007 01:35, Jeff Garzik wrote: spin_lock_irq() should generally be avoided. In cases like the first case -- input_repeat_key() -- you are making incorrect assumptions about the state of interrupts. The other cases are probably ok, but in general