kernel_optimize_test/drivers/media/cec
Hans Verkuil aa57725e2d media: cec-pin: fix interrupt en/disable handling
commit 713bdfa10b5957053811470d298def9537d9ff13 upstream.

The en/disable_irq() functions keep track of the 'depth': i.e. if
interrupts are disabled twice, then it needs to enable_irq() calls to
enable them again. The cec-pin framework didn't take this into accound
and could disable irqs multiple times, and it expected that a single
enable_irq() would enable them again.

Move all calls to en/disable_irq() to the kthread where it is easy
to keep track of the current irq state and ensure that multiple
en/disable_irq calls never happen.

If interrupts where disabled twice, then they would never turn on
again, leaving the CEC adapter in a dead state.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Fixes: 865463fc03 (media: cec-pin: add error injection support)
Cc: <stable@vger.kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-27 10:53:43 +01:00
..
core media: cec-pin: fix interrupt en/disable handling 2022-01-27 10:53:43 +01:00
i2c media: cec: i2c: ch7322: Add ch7322 CEC controller driver 2020-07-04 12:16:18 +02:00
platform media: tegra-cec: Handle errors of clk_prepare_enable() 2021-09-18 13:40:25 +02:00
usb media: pulse8-cec: add support for FW v10 and up 2020-12-01 16:20:02 +01:00
Kconfig media: cec: i2c: ch7322: Add ch7322 CEC controller driver 2020-07-04 12:16:18 +02:00
Makefile media: cec: i2c: ch7322: Add ch7322 CEC controller driver 2020-07-04 12:16:18 +02:00