]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: cec: core: add adap_unconfigured() callback
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Mon, 12 Jun 2023 13:58:38 +0000 (15:58 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Sep 2023 07:48:30 +0000 (09:48 +0200)
commit9fa26c6ac16820d5abaa7cbcbc740d3fd40245ba
tree53ceddc591c5365845fac8039331fe523f08c6a4
parent258e4784b8b5e5041f89f2ea68482ebf55502316
media: cec: core: add adap_unconfigured() callback

[ Upstream commit 948a77aaecf202f722cf2264025f9987e5bd5c26 ]

The adap_configured() callback was called with the adap->lock mutex
held if the 'configured' argument was false, and without the adap->lock
mutex held if that argument was true.

That was very confusing, and so split this up in a adap_unconfigured()
callback and a high-level configured() callback.

This also makes it easier to understand when the mutex is held: all
low-level adap_* callbacks are called with the mutex held. All other
callbacks are called without that mutex held.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Fixes: f1b57164305d ("media: cec: add optional adap_configured callback")
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/cec/core/cec-adap.c
include/media/cec.h