diff options
| author | Hans Verkuil <hverkuil+cisco@kernel.org> | 2026-07-10 13:07:34 +0200 |
|---|---|---|
| committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2026-07-17 10:14:13 +0200 |
| commit | cba172820898140dc1fd4c2223ddf3ded978d2b2 (patch) | |
| tree | ef4a9b78147caea675c058fa09f5cc326e9e127e /drivers | |
| parent | 350308a05f7dd5e03ab8d966dd672288749efb64 (diff) | |
| download | linux-next-cba172820898140dc1fd4c2223ddf3ded978d2b2.tar.gz linux-next-cba172820898140dc1fd4c2223ddf3ded978d2b2.zip | |
media: cec/core: add a new CEC_LOG_ADDRS_FL_CONFIG_FAILED flag
If claiming a logical address fails, then set the
CEC_LOG_ADDRS_FL_CONFIG_FAILED flag. This makes it possible for
userspace to detect this corner case.
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/media/cec/core/cec-adap.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/cec/core/cec-adap.c b/drivers/media/cec/core/cec-adap.c index 4d14186bfef6..774bf9099183 100644 --- a/drivers/media/cec/core/cec-adap.c +++ b/drivers/media/cec/core/cec-adap.c @@ -1482,6 +1482,7 @@ static int cec_config_thread_func(void *arg) dprintk(1, "physical address: %x.%x.%x.%x, claim %d logical addresses\n", cec_phys_addr_exp(adap->phys_addr), las->num_log_addrs); las->log_addr_mask = 0; + las->flags &= ~CEC_LOG_ADDRS_FL_CONFIG_FAILED; if (las->log_addr_type[0] == CEC_LOG_ADDR_TYPE_UNREGISTERED) goto configured; @@ -1614,6 +1615,8 @@ configured: unconfigure: for (i = 0; i < las->num_log_addrs; i++) las->log_addr[i] = CEC_LOG_ADDR_INVALID; + if (adap->phys_addr != CEC_PHYS_ADDR_INVALID) + las->flags |= CEC_LOG_ADDRS_FL_CONFIG_FAILED; cec_adap_unconfigure(adap); adap->is_configuring = false; adap->must_reconfigure = false; |
