media: rc-core: consistent use of rc_repeat()
authorDavid Härdeman <david@hardeman.nu>
Thu, 22 Jun 2017 19:23:54 +0000 (15:23 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Sun, 20 Aug 2017 13:34:39 +0000 (09:34 -0400)
commit265a2988d202b3aba0bbbb4d828c66d3741d59db
treefd709730afc881d79b463dbb6119a38bdb24a225
parentab45e85851829ebb4e233ba5e401affa4128a352
media: rc-core: consistent use of rc_repeat()

The NEC decoder and the Sanyo decoders check if dev->keypressed is true
before calling rc_repeat (without holding dev->keylock).

Meanwhile, the XMP and JVC decoders do no such checks.

This patch makes sure all users of rc_repeat() do so consistently by
removing extra checks in NEC/Sanyo and modifying the check a bit in
rc_repeat() so that no input event is generated if the key isn't pressed.

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/rc/ir-nec-decoder.c
drivers/media/rc/ir-sanyo-decoder.c
drivers/media/rc/rc-main.c