[PATCH 04/13] IR: fix locking in ir_raw_event_work

2010-07-30 Thread Maxim Levitsky
It is prefectly possible to have ir_raw_event_work running concurently on two cpus, thus we must protect it from that situation. Just switch to a thread that we wake up as soon as we have data. This also ensures that this thread doesn't run unnessesarly. Signed-off-by: Maxim Levitsky --- driver

Re: [PATCH 04/13] IR: fix locking in ir_raw_event_work

2010-07-30 Thread Maxim Levitsky
On Thu, 2010-07-29 at 22:42 -0400, Andy Walls wrote: > On Fri, 2010-07-30 at 05:17 +0300, Maxim Levitsky wrote: > > It is prefectly possible to have ir_raw_event_work > > running concurently on two cpus, thus we must protect > > it from that situation. > > Yup, the work is marked as not pending (

Re: [PATCH 04/13] IR: fix locking in ir_raw_event_work

2010-07-29 Thread Andy Walls
On Fri, 2010-07-30 at 05:17 +0300, Maxim Levitsky wrote: > It is prefectly possible to have ir_raw_event_work > running concurently on two cpus, thus we must protect > it from that situation. Yup, the work is marked as not pending (and hence reschedulable) just before the work handler is run. >

[PATCH 04/13] IR: fix locking in ir_raw_event_work

2010-07-29 Thread Maxim Levitsky
It is prefectly possible to have ir_raw_event_work running concurently on two cpus, thus we must protect it from that situation. Maybe better solution is to ditch the workqueue at all and use good 'ol thread per receiver, and just wake it up... Signed-off-by: Maxim Levitsky --- drivers/media/IR