Revert "media: cec: core: avoid recursive cec_claim_log_addrs"

This reverts commit 5103090f4e which is
commit 47c82aac10a6954d68f29f10d9758d016e8e5af1 upstream.

It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.

Bug: 161946584
Change-Id: I58fa015fd62c79ab2bdfb07bdb4cd1ca10e8e4c4
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Greg Kroah-Hartman
2024-07-15 17:17:39 +00:00
parent 0546f6a05d
commit 8047831dc6
3 changed files with 2 additions and 7 deletions

View File

@@ -1541,12 +1541,9 @@ unconfigure:
*/
static void cec_claim_log_addrs(struct cec_adapter *adap, bool block)
{
if (WARN_ON(adap->is_claiming_log_addrs ||
adap->is_configuring || adap->is_configured))
if (WARN_ON(adap->is_configuring || adap->is_configured))
return;
adap->is_claiming_log_addrs = true;
init_completion(&adap->config_completion);
/* Ready to kick off the thread */
@@ -1561,7 +1558,6 @@ static void cec_claim_log_addrs(struct cec_adapter *adap, bool block)
wait_for_completion(&adap->config_completion);
mutex_lock(&adap->lock);
}
adap->is_claiming_log_addrs = false;
}
/*

View File

@@ -178,7 +178,7 @@ static long cec_adap_s_log_addrs(struct cec_adapter *adap, struct cec_fh *fh,
CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU |
CEC_LOG_ADDRS_FL_CDC_ONLY;
mutex_lock(&adap->lock);
if (!adap->is_claiming_log_addrs && !adap->is_configuring &&
if (!adap->is_configuring &&
(!log_addrs.num_log_addrs || !adap->is_configured) &&
!cec_is_busy(adap, fh)) {
err = __cec_s_log_addrs(adap, &log_addrs, block);

View File

@@ -239,7 +239,6 @@ struct cec_adapter {
u16 phys_addr;
bool needs_hpd;
bool is_enabled;
bool is_claiming_log_addrs;
bool is_configuring;
bool is_configured;
bool cec_pin_is_high;