mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 06:25:52 +02:00
UPSTREAM: media: cec: clear all cec_log_addrs fields
The CEC version, vendor ID and OSD name were not cleared when clearing the
current set of logical addresses. This was unexpected and somewhat confusing,
so reset all these fields to their default values. Also document this since
the documentation wasn't quite clear either.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit 299708e45e)
Change-Id: I545cc282812219f9bca7b3b165b3dd9410fd33d7
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
This commit is contained in:
parent
90d6a371c2
commit
90d3939bab
|
|
@ -1471,8 +1471,13 @@ int __cec_s_log_addrs(struct cec_adapter *adap,
|
|||
return -ENODEV;
|
||||
|
||||
if (!log_addrs || log_addrs->num_log_addrs == 0) {
|
||||
adap->log_addrs.num_log_addrs = 0;
|
||||
cec_adap_unconfigure(adap);
|
||||
adap->log_addrs.num_log_addrs = 0;
|
||||
for (i = 0; i < CEC_MAX_LOG_ADDRS; i++)
|
||||
adap->log_addrs.log_addr[i] = CEC_LOG_ADDR_INVALID;
|
||||
adap->log_addrs.osd_name[0] = '\0';
|
||||
adap->log_addrs.vendor_id = CEC_VENDOR_ID_NONE;
|
||||
adap->log_addrs.cec_version = CEC_OP_CEC_VERSION_2_0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user