]> git.baikalelectronics.ru Git - kernel.git/commit
media: gpio-ir-tx: spinlock is not needed to disable interrupts
authorSean Young <sean@mess.org>
Thu, 13 Aug 2020 09:08:49 +0000 (11:08 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Fri, 28 Aug 2020 12:06:36 +0000 (14:06 +0200)
commit06517f4205d3a1f99d5a1cf73e3d77bfed735dda
tree06315fe98be8afb94797cdf14511086da86d2bbc
parent901571b488bdfe3c25c41d35ce73235d7ac9addb
media: gpio-ir-tx: spinlock is not needed to disable interrupts

During bit-banging the IR on a gpio pin, we cannot be scheduled or have
anything interrupt us, else the generated signal will be incorrect.
Therefore, we need to disable interrupts on the local cpu. This also
disables preemption.

local_irq_disable() does exactly what we need and does not require a
spinlock.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/rc/gpio-ir-tx.c