media: ir_toy: prevent device from hanging during transmit
authorSean Young <sean@mess.org>
Tue, 14 Sep 2021 14:57:46 +0000 (16:57 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 30 Sep 2021 08:10:26 +0000 (10:10 +0200)
commit4114978dcd24e72415276bba60ff4ff355970bbc
treec66b1a0dfb763770a3e3c57657669fc3a3128e19
parent218848835699879ed6260ec49bbb22e9e7839017
media: ir_toy: prevent device from hanging during transmit

If the IR Toy is receiving IR while a transmit is done, it may end up
hanging. We can prevent this from happening by re-entering sample mode
just before issuing the transmit command.

Link: https://github.com/bengtmartensson/HarcHardware/discussions/25
Cc: stable@vger.kernel.org
[mchehab: renamed: s/STATE_RESET/STATE_COMMAND_NO_RESP/ ]
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/rc/ir_toy.c