Commit 8dd65ed6 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

media: cec: remove unused waitq and phys_addrs fields

The cec_adapter struct contained a waitq field that isn't used
anywhere, so drop this.

It also contained a phys_addrs array to store any reported physical
addresses. However, this was never actually used, so this field is
removed as well. The original idea was to let the core keep track of
this information, but nothing was ever done with this. Should this
be needed in the future then it is easy enough to resurrect this.
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent b16c928c
...@@ -1306,7 +1306,6 @@ static int cec_config_log_addr(struct cec_adapter *adap, ...@@ -1306,7 +1306,6 @@ static int cec_config_log_addr(struct cec_adapter *adap,
las->log_addr[idx] = log_addr; las->log_addr[idx] = log_addr;
las->log_addr_mask |= 1 << log_addr; las->log_addr_mask |= 1 << log_addr;
adap->phys_addrs[log_addr] = adap->phys_addr;
return 1; return 1;
} }
...@@ -1324,7 +1323,6 @@ static void cec_adap_unconfigure(struct cec_adapter *adap) ...@@ -1324,7 +1323,6 @@ static void cec_adap_unconfigure(struct cec_adapter *adap)
adap->log_addrs.log_addr_mask = 0; adap->log_addrs.log_addr_mask = 0;
adap->is_configuring = false; adap->is_configuring = false;
adap->is_configured = false; adap->is_configured = false;
memset(adap->phys_addrs, 0xff, sizeof(adap->phys_addrs));
cec_flush(adap); cec_flush(adap);
wake_up_interruptible(&adap->kthread_waitq); wake_up_interruptible(&adap->kthread_waitq);
cec_post_state_event(adap); cec_post_state_event(adap);
...@@ -1974,8 +1972,6 @@ static int cec_receive_notify(struct cec_adapter *adap, struct cec_msg *msg, ...@@ -1974,8 +1972,6 @@ static int cec_receive_notify(struct cec_adapter *adap, struct cec_msg *msg,
case CEC_MSG_REPORT_PHYSICAL_ADDR: { case CEC_MSG_REPORT_PHYSICAL_ADDR: {
u16 pa = (msg->msg[2] << 8) | msg->msg[3]; u16 pa = (msg->msg[2] << 8) | msg->msg[3];
if (!from_unregistered)
adap->phys_addrs[init_laddr] = pa;
dprintk(1, "reported physical address %x.%x.%x.%x for logical address %d\n", dprintk(1, "reported physical address %x.%x.%x.%x for logical address %d\n",
cec_phys_addr_exp(pa), init_laddr); cec_phys_addr_exp(pa), init_laddr);
break; break;
......
...@@ -265,7 +265,6 @@ struct cec_adapter *cec_allocate_adapter(const struct cec_adap_ops *ops, ...@@ -265,7 +265,6 @@ struct cec_adapter *cec_allocate_adapter(const struct cec_adap_ops *ops,
adap->sequence = 0; adap->sequence = 0;
adap->ops = ops; adap->ops = ops;
adap->priv = priv; adap->priv = priv;
memset(adap->phys_addrs, 0xff, sizeof(adap->phys_addrs));
mutex_init(&adap->lock); mutex_init(&adap->lock);
INIT_LIST_HEAD(&adap->transmit_queue); INIT_LIST_HEAD(&adap->transmit_queue);
INIT_LIST_HEAD(&adap->wait_queue); INIT_LIST_HEAD(&adap->wait_queue);
......
...@@ -162,7 +162,6 @@ struct cec_adapter { ...@@ -162,7 +162,6 @@ struct cec_adapter {
struct task_struct *kthread; struct task_struct *kthread;
wait_queue_head_t kthread_waitq; wait_queue_head_t kthread_waitq;
wait_queue_head_t waitq;
const struct cec_adap_ops *ops; const struct cec_adap_ops *ops;
void *priv; void *priv;
...@@ -197,7 +196,6 @@ struct cec_adapter { ...@@ -197,7 +196,6 @@ struct cec_adapter {
struct dentry *status_file; struct dentry *status_file;
struct dentry *error_inj_file; struct dentry *error_inj_file;
u16 phys_addrs[15];
u32 sequence; u32 sequence;
char input_phys[32]; char input_phys[32];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment