Skip to content
Commit 3e938b7d authored by Hans Verkuil's avatar Hans Verkuil Committed by Greg Kroah-Hartman
Browse files

media: cec-adap.c: drop activate_cnt, use state info instead

[ Upstream commit f9222f8c

 ]

Using an activation counter to decide when the enable or disable the
cec adapter is not the best approach and can lead to race conditions.

Change this to determining the current status of the adapter, and
enable or disable the adapter accordingly.

It now only needs to be called whenever there is a chance that the
state changes, and it can handle enabling/disabling monitoring as
well if needed.

This simplifies the code and it should be a more robust approach as well.

Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
Stable-dep-of: 47c82aac

 ("media: cec: core: avoid recursive cec_claim_log_addrs")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 73ef9ae9
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment