aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJarod Wilson <jarod@redhat.com>2011-01-26 10:20:09 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-01-31 09:20:35 -0500
commit5bd9d73c84a519b828f95ce295587b83eab3329e (patch)
treeaa2b214068ee18f51b43d613d83e601eab345199
parentb4608faee04047ecb15d2acf276d12e21b170b0d (diff)
[media] mceusb: really fix remaining keybounce issues
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>
-rw-r--r--drivers/media/rc/mceusb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/rc/mceusb.c b/drivers/media/rc/mceusb.c
index 6012fb2d722d..6df0a4980645 100644
--- a/drivers/media/rc/mceusb.c
+++ b/drivers/media/rc/mceusb.c
@@ -855,6 +855,7 @@ static void mceusb_process_ir_data(struct mceusb_dev *ir, int buf_len)
855 break; 855 break;
856 case PARSE_IRDATA: 856 case PARSE_IRDATA:
857 ir->rem--; 857 ir->rem--;
858 init_ir_raw_event(&rawir);
858 rawir.pulse = ((ir->buf_in[i] & MCE_PULSE_BIT) != 0); 859 rawir.pulse = ((ir->buf_in[i] & MCE_PULSE_BIT) != 0);
859 rawir.duration = (ir->buf_in[i] & MCE_PULSE_MASK) 860 rawir.duration = (ir->buf_in[i] & MCE_PULSE_MASK)
860 * US_TO_NS(MCE_TIME_UNIT); 861 * US_TO_NS(MCE_TIME_UNIT);
@@ -883,6 +884,8 @@ static void mceusb_process_ir_data(struct mceusb_dev *ir, int buf_len)
883 i, ir->rem + 1, false); 884 i, ir->rem + 1, false);
884 if (ir->rem) 885 if (ir->rem)
885 ir->parser_state = PARSE_IRDATA; 886 ir->parser_state = PARSE_IRDATA;
887 else
888 ir_raw_event_reset(ir->rc);
886 break; 889 break;
887 } 890 }
888 891