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 f

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

2007-07-28 Thread Dmitry Torokhov
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) > > +{ > > + if (fuzz) { > > + if (value > o

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

2007-07-27 Thread Indan Zupancic
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) > +{ > + if (fuzz) { > + if (value > old_val - fuzz / 2 && value < old_val + fuzz / 2) > + retu

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 spin_l

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