diff options
author | Maxim Levitsky <maximlevitsky@gmail.com> | 2010-10-16 18:56:28 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-10-21 08:59:47 -0400 |
commit | 4651918a4afdd49bdea21d2f919b189ef17a6399 (patch) | |
tree | 73a4e3b5f7da1d655a059bb9b69135cf6f395e02 /drivers/media/IR/ir-rc5-sz-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-sz-decoder.c')
-rw-r--r-- | drivers/media/IR/ir-rc5-sz-decoder.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/IR/ir-rc5-sz-decoder.c b/drivers/media/IR/ir-rc5-sz-decoder.c index 68f11d6acd5b..7c413501a3f7 100644 --- a/drivers/media/IR/ir-rc5-sz-decoder.c +++ b/drivers/media/IR/ir-rc5-sz-decoder.c | |||
@@ -51,8 +51,9 @@ static int ir_rc5_sz_decode(struct input_dev *input_dev, struct ir_raw_event ev) | |||
51 | if (!(ir_dev->raw->enabled_protocols & IR_TYPE_RC5_SZ)) | 51 | if (!(ir_dev->raw->enabled_protocols & IR_TYPE_RC5_SZ)) |
52 | return 0; | 52 | return 0; |
53 | 53 | ||
54 | if (IS_RESET(ev)) { | 54 | if (!is_timing_event(ev)) { |
55 | data->state = STATE_INACTIVE; | 55 | if (ev.reset) |
56 | data->state = STATE_INACTIVE; | ||
56 | return 0; | 57 | return 0; |
57 | } | 58 | } |
58 | 59 | ||