]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[media] mceusb: really fix remaining keybounce issues
authorJarod Wilson <jarod@redhat.com>
Wed, 26 Jan 2011 15:20:09 +0000 (12:20 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 31 Jan 2011 14:20:35 +0000 (12:20 -0200)
Make sure rawir struct is zeroed out before populating it for each
ir_raw_event_store_with_filter() call, and when we see a trailing 0x80
packet (end-of-data), issue an ir_raw_event_reset() call.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/rc/mceusb.c

index 6012fb2d722dd4cefaffa6ee3433d2c07ea7b30d..6df0a49806452f640667f2c783cfdbeabcd99010 100644 (file)
@@ -855,6 +855,7 @@ static void mceusb_process_ir_data(struct mceusb_dev *ir, int buf_len)
                        break;
                case PARSE_IRDATA:
                        ir->rem--;
+                       init_ir_raw_event(&rawir);
                        rawir.pulse = ((ir->buf_in[i] & MCE_PULSE_BIT) != 0);
                        rawir.duration = (ir->buf_in[i] & MCE_PULSE_MASK)
                                         * US_TO_NS(MCE_TIME_UNIT);
@@ -883,6 +884,8 @@ static void mceusb_process_ir_data(struct mceusb_dev *ir, int buf_len)
                                             i, ir->rem + 1, false);
                        if (ir->rem)
                                ir->parser_state = PARSE_IRDATA;
+                       else
+                               ir_raw_event_reset(ir->rc);
                        break;
                }