]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
[media] ir-raw: Properly initialize the IR event (BZ#27202)
authorMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 20 Jan 2011 21:16:50 +0000 (18:16 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 2 Feb 2011 13:20:04 +0000 (11:20 -0200)
Changeset 4651918a4afdd49bdea21d2f919b189ef17a6399 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>
drivers/media/rc/ir-raw.c

index 73230ff93b8ac0d117801a9b98ab8fbb69e6e11a..01f258a2a57adfd17a287153c9991183ab064342 100644 (file)
@@ -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)
@@ -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