Skip to content
Commit 152b0a9a authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab
Browse files

media: cec: ensure that adap_enable(false) is called from cec_delete_adapter()



When the adapter is removed the cec_delete_adapter() call attempts
to set the physical address to INVALID by calling __cec_s_phys_addr()
and so disabling the adapter.

However, __cec_s_phys_addr checks if the device node was unregistered
and just returns in that case.

This means that the adap_enable callback is never called with 'false'
to disable the CEC adapter. Most drivers don't care, but some need
to do cleanup here.

Change the test so the adapter is correctly disabled, even when the
device node is unregistered.

Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Reported-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 0779b885
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment