On Mon, May 01, 2017 at 06:10:06PM +0200, David Härdeman wrote: > Obvious fix, leave repeat handling to rc-core > > Signed-off-by: David Härdeman <david@xxxxxxxxxxx> > --- > drivers/media/rc/ir-nec-decoder.c | 10 +++------- > 1 file changed, 3 insertions(+), 7 deletions(-) > > diff --git a/drivers/media/rc/ir-nec-decoder.c b/drivers/media/rc/ir-nec-decoder.c > index 3ce850314dca..75b9137f6faf 100644 > --- a/drivers/media/rc/ir-nec-decoder.c > +++ b/drivers/media/rc/ir-nec-decoder.c > @@ -88,13 +88,9 @@ static int ir_nec_decode(struct rc_dev *dev, struct ir_raw_event ev) > data->state = STATE_BIT_PULSE; > return 0; > } else if (eq_margin(ev.duration, NEC_REPEAT_SPACE, NEC_UNIT / 2)) { > - if (!dev->keypressed) { > - IR_dprintk(1, "Discarding last key repeat: event after key up\n"); > - } else { > - rc_repeat(dev); > - IR_dprintk(1, "Repeat last key\n"); > - data->state = STATE_TRAILER_PULSE; > - } > + rc_repeat(dev); > + IR_dprintk(1, "Repeat last key\n"); > + data->state = STATE_TRAILER_PULSE; This is not correct. This means that whenever a nec repeat is received, the last scancode is sent to the input device, irrespective of whether there has been no IR for hours. The original code is stricter. > return 0; > } >