Commit 83587839 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[media] ir-raw: Properly initialize the IR event (BZ#27202)

Changeset 4651918a changed the way events
are stored. However, it forgot to fix ir_raw_event_store_edge() to work
with the new way. Due to that, the decoders will likely do bad things.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 752eb7ae
...@@ -112,7 +112,7 @@ int ir_raw_event_store_edge(struct rc_dev *dev, enum raw_event_type type) ...@@ -112,7 +112,7 @@ int ir_raw_event_store_edge(struct rc_dev *dev, enum raw_event_type type)
{ {
ktime_t now; ktime_t now;
s64 delta; /* ns */ s64 delta; /* ns */
struct ir_raw_event ev; DEFINE_IR_RAW_EVENT(ev);
int rc = 0; int rc = 0;
if (!dev->raw) if (!dev->raw)
...@@ -125,7 +125,6 @@ int ir_raw_event_store_edge(struct rc_dev *dev, enum raw_event_type type) ...@@ -125,7 +125,6 @@ int ir_raw_event_store_edge(struct rc_dev *dev, enum raw_event_type type)
* being called for the first time, note that delta can't * being called for the first time, note that delta can't
* possibly be negative. * possibly be negative.
*/ */
ev.duration = 0;
if (delta > IR_MAX_DURATION || !dev->raw->last_type) if (delta > IR_MAX_DURATION || !dev->raw->last_type)
type |= IR_START_EVENT; type |= IR_START_EVENT;
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment