media: ir_toy: prevent device from hanging during transmit
[ Upstream commit 4114978dcd24e72415276bba60ff4ff355970bbc ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
e1716b0ff9
commit
a4ac45aff8
@@ -310,7 +310,7 @@ static int irtoy_tx(struct rc_dev *rc, uint *txbuf, uint count)
|
||||
buf[i] = cpu_to_be16(v);
|
||||
}
|
||||
|
||||
buf[count] = cpu_to_be16(0xffff);
|
||||
buf[count] = 0xffff;
|
||||
|
||||
irtoy->tx_buf = buf;
|
||||
irtoy->tx_len = size;
|
||||
|
||||
Reference in New Issue
Block a user