diff options
Diffstat (limited to 'drivers/media/rc/mceusb.c')
-rw-r--r-- | drivers/media/rc/mceusb.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/media/rc/mceusb.c b/drivers/media/rc/mceusb.c index f38d9a8c6880..d289fd42729f 100644 --- a/drivers/media/rc/mceusb.c +++ b/drivers/media/rc/mceusb.c @@ -974,6 +974,7 @@ static void mceusb_handle_command(struct mceusb_dev *ir, int index) static void mceusb_process_ir_data(struct mceusb_dev *ir, int buf_len) { DEFINE_IR_RAW_EVENT(rawir); + bool event = false; int i = 0; /* skip meaningless 0xb1 0x60 header bytes on orig receiver */ @@ -1004,7 +1005,8 @@ static void mceusb_process_ir_data(struct mceusb_dev *ir, int buf_len) rawir.pulse ? "pulse" : "space", rawir.duration); - ir_raw_event_store_with_filter(ir->rc, &rawir); + if (ir_raw_event_store_with_filter(ir->rc, &rawir)) + event = true; break; case CMD_DATA: ir->rem--; @@ -1032,8 +1034,10 @@ static void mceusb_process_ir_data(struct mceusb_dev *ir, int buf_len) if (ir->parser_state != CMD_HEADER && !ir->rem) ir->parser_state = CMD_HEADER; } - mce_dbg(ir->dev, "processed IR data, calling ir_raw_event_handle\n"); - ir_raw_event_handle(ir->rc); + if (event) { + mce_dbg(ir->dev, "processed IR data, calling ir_raw_event_handle\n"); + ir_raw_event_handle(ir->rc); + } } static void mceusb_dev_recv(struct urb *urb) |