]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
i2c: pnx: Fix potential deadlock warning from del_timer_sync() call in isr
authorPiotr Wojtaszczyk <piotr.wojtaszczyk@timesys.com>
Fri, 28 Jun 2024 15:25:42 +0000 (17:25 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 Jul 2024 10:51:20 +0000 (12:51 +0200)
commit27cd3873fa76ebeb9f948baae40cb9a6d8692289
tree57f04c4fff5cb7c13011e3af34a64c7bc45381d9
parent7c73459c756f388ac8f2aa360d6be6d2ba9af47e
i2c: pnx: Fix potential deadlock warning from del_timer_sync() call in isr

[ Upstream commit f63b94be6942ba82c55343e196bd09b53227618e ]

When del_timer_sync() is called in an interrupt context it throws a warning
because of potential deadlock. The timer is used only to exit from
wait_for_completion() after a timeout so replacing the call with
wait_for_completion_timeout() allows to remove the problematic timer and
its related functions altogether.

Fixes: 41561f28e76a ("i2c: New Philips PNX bus driver")
Signed-off-by: Piotr Wojtaszczyk <piotr.wojtaszczyk@timesys.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/i2c/busses/i2c-pnx.c