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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Oct 2021 13:55:49 +0000 (15:55 +0200)
commit31a13f039e15e6e16d30081cd07a8bbb1d9526e3
treef3acda8a07752aa0ec90d57b369dcff75fd9f1dc
parent249e5e5a501ee69b26d55b68f863671396e62f7f
media: ir_toy: prevent device from hanging during transmit

commit f0c15b360fb65ee39849afe987c16eb3d0175d0d upstream.

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
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/rc/ir_toy.c