media: cec: use call_op and check for !unregistered
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Thu, 17 Mar 2022 08:51:20 +0000 (08:51 +0000)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Sun, 24 Apr 2022 06:40:42 +0000 (07:40 +0100)
commite2ed5024ac2bc27d4bfc99fd58f5ab54de8fa965
treecbf06cf9cdc0b39160ff83a0e4b48af9582989f4
parent567f882a401346779d05a90beb8f21865ebdd398
media: cec: use call_op and check for !unregistered

Use call_(void_)op consistently in the CEC core framework. Ditto
for the cec pin ops. And check if !adap->devnode.unregistered before
calling each op. This avoids calls to ops when the device has been
unregistered and the underlying hardware may be gone.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/cec/core/cec-adap.c
drivers/media/cec/core/cec-api.c
drivers/media/cec/core/cec-core.c
drivers/media/cec/core/cec-pin-priv.h
drivers/media/cec/core/cec-pin.c
drivers/media/cec/core/cec-priv.h