UPSTREAM: [media] cec: update log_addr[] before finishing configuration
The loop that sets the unused logical addresses to INVALID should be
done before 'configured' is set to true. This ensures that cec_log_addrs
is consistent before it will be used.
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit 7af26f889e)
Change-Id: I431f4df06482c20c1a33d7b32afc742e61947425
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
This commit is contained in:
parent
3939b39580
commit
36fb482b62
1 changed files with 2 additions and 2 deletions
|
|
@ -1250,6 +1250,8 @@ configured:
|
|||
for (i = 1; i < las->num_log_addrs; i++)
|
||||
las->log_addr[i] = CEC_LOG_ADDR_INVALID;
|
||||
}
|
||||
for (i = las->num_log_addrs; i < CEC_MAX_LOG_ADDRS; i++)
|
||||
las->log_addr[i] = CEC_LOG_ADDR_INVALID;
|
||||
adap->is_configured = true;
|
||||
adap->is_configuring = false;
|
||||
cec_post_state_event(adap);
|
||||
|
|
@ -1268,8 +1270,6 @@ configured:
|
|||
cec_report_features(adap, i);
|
||||
cec_report_phys_addr(adap, i);
|
||||
}
|
||||
for (i = las->num_log_addrs; i < CEC_MAX_LOG_ADDRS; i++)
|
||||
las->log_addr[i] = CEC_LOG_ADDR_INVALID;
|
||||
mutex_lock(&adap->lock);
|
||||
adap->kthread_config = NULL;
|
||||
mutex_unlock(&adap->lock);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue