summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorHans Verkuil <hansverk@cisco.com>2016-12-09 11:48:34 -0200
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-12-21 07:02:36 -0200
commitd3d64bc7408f1ff0b0ff8354056e2a48eda5886d (patch)
treebf39c7f687b9706ac4064368184ac8c19cbae04c /drivers/media
parent52bc30fda9622f492427d484bd4dd8ee42cc4667 (diff)
[media] cec: move cec_report_phys_addr into cec_config_thread_func
It's only a small function and this makes it easier to switch to transmitting the message with adap->lock held in the next patch. Signed-off-by: Hans Verkuil <hansverk@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/cec/cec-adap.c25
1 files changed, 7 insertions, 18 deletions
diff --git a/drivers/media/cec/cec-adap.c b/drivers/media/cec/cec-adap.c
index 2b668510ca36..f3d495654a53 100644
--- a/drivers/media/cec/cec-adap.c
+++ b/drivers/media/cec/cec-adap.c
@@ -30,7 +30,6 @@
#include "cec-priv.h"
-static int cec_report_phys_addr(struct cec_adapter *adap, unsigned int la_idx);
static void cec_fill_msg_report_features(struct cec_adapter *adap,
struct cec_msg *msg,
unsigned int la_idx);
@@ -1275,7 +1274,13 @@ configured:
cec_transmit_msg(adap, &msg, false);
}
- cec_report_phys_addr(adap, i);
+ /* Report Physical Address */
+ cec_msg_report_physical_addr(&msg, adap->phys_addr,
+ las->primary_device_type[i]);
+ dprintk(2, "config: la %d pa %x.%x.%x.%x\n",
+ las->log_addr[i],
+ cec_phys_addr_exp(adap->phys_addr));
+ cec_transmit_msg(adap, &msg, false);
}
mutex_lock(&adap->lock);
adap->kthread_config = NULL;
@@ -1561,22 +1566,6 @@ static void cec_fill_msg_report_features(struct cec_adapter *adap,
}
}
-/* Transmit the Report Physical Address message */
-static int cec_report_phys_addr(struct cec_adapter *adap, unsigned int la_idx)
-{
- const struct cec_log_addrs *las = &adap->log_addrs;
- struct cec_msg msg = { };
-
- /* Report Physical Address */
- msg.msg[0] = (las->log_addr[la_idx] << 4) | 0x0f;
- cec_msg_report_physical_addr(&msg, adap->phys_addr,
- las->primary_device_type[la_idx]);
- dprintk(2, "config: la %d pa %x.%x.%x.%x\n",
- las->log_addr[la_idx],
- cec_phys_addr_exp(adap->phys_addr));
- return cec_transmit_msg(adap, &msg, false);
-}
-
/* Transmit the Feature Abort message */
static int cec_feature_abort_reason(struct cec_adapter *adap,
struct cec_msg *msg, u8 reason)