media: gpio-ir-tx: improve precision of transmitted signal due to scheduling
authorSean Young <sean@mess.org>
Sat, 2 May 2020 12:50:52 +0000 (14:50 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Sep 2020 09:22:28 +0000 (11:22 +0200)
commitb3650117d1d2ca8861fa81fa14de158ac79007bc
tree5451ab90e0b2613624325af33fd71b9614546e77
parent17519b4978718219ef71d61d59d95a138bdb0a51
media: gpio-ir-tx: improve precision of transmitted signal due to scheduling

[ Upstream commit ea8912b788f8144e7d32ee61e5ccba45424bef83 ]

usleep_range() may take longer than the max argument due to scheduling,
especially under load. This is causing random errors in the transmitted
IR. Remove the usleep_range() in favour of busy-looping with udelay().

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>
drivers/media/rc/gpio-ir-tx.c