diff options
author | Maxim Levitsky <maximlevitsky@gmail.com> | 2010-10-16 19:56:28 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-10-21 10:59:47 -0200 |
commit | 4651918a4afdd49bdea21d2f919b189ef17a6399 (patch) | |
tree | 73a4e3b5f7da1d655a059bb9b69135cf6f395e02 /drivers/media/IR/ir-rc5-decoder.c | |
parent | fb249ca61d469a9cb666ba7e1d992787dc6bad82 (diff) |
[media] IR: extend ir_raw_event and do refactoring
Add new event types for timeout & carrier report
Move timeout handling from ir_raw_event_store_with_filter to
ir-lirc-codec, where it is really needed.
Now lirc bridge ensures proper gap handling.
Extend lirc bridge for carrier & timeout reports
Note: all new ir_raw_event variables now should be initialized
like that: DEFINE_IR_RAW_EVENT(ev);
To clean an existing event, use init_ir_raw_event(&ev);
Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/IR/ir-rc5-decoder.c')
-rw-r--r-- | drivers/media/IR/ir-rc5-decoder.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/IR/ir-rc5-decoder.c b/drivers/media/IR/ir-rc5-decoder.c index df4770d978a..572ed4ca8c6 100644 --- a/drivers/media/IR/ir-rc5-decoder.c +++ b/drivers/media/IR/ir-rc5-decoder.c @@ -55,8 +55,9 @@ static int ir_rc5_decode(struct input_dev *input_dev, struct ir_raw_event ev) if (!(ir_dev->raw->enabled_protocols & IR_TYPE_RC5)) return 0; - if (IS_RESET(ev)) { - data->state = STATE_INACTIVE; + if (!is_timing_event(ev)) { + if (ev.reset) + data->state = STATE_INACTIVE; return 0; } |