Skip to content

Commit

Permalink
[media] ir-raw: Properly initialize the IR event (BZ#27202)
Browse files Browse the repository at this point in the history
Changeset 4651918 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: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Mauro Carvalho Chehab committed Feb 2, 2011
1 parent 752eb7a commit 8358783
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/media/rc/ir-raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ int ir_raw_event_store_edge(struct rc_dev *dev, enum raw_event_type type)
{
ktime_t now;
s64 delta; /* ns */
struct ir_raw_event ev;
DEFINE_IR_RAW_EVENT(ev);
int rc = 0;

if (!dev->raw)
Expand All @@ -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
* possibly be negative.
*/
ev.duration = 0;
if (delta > IR_MAX_DURATION || !dev->raw->last_type)
type |= IR_START_EVENT;
else
Expand Down

0 comments on commit 8358783

Please sign in to comment.