diff options
author | Hans Verkuil <hansverk@cisco.com> | 2016-12-09 08:48:34 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-12-21 04:02:36 -0500 |
commit | d3d64bc7408f1ff0b0ff8354056e2a48eda5886d (patch) | |
tree | bf39c7f687b9706ac4064368184ac8c19cbae04c | |
parent | 52bc30fda9622f492427d484bd4dd8ee42cc4667 (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>
-rw-r--r-- | drivers/media/cec/cec-adap.c | 25 |
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 @@ | |||
30 | 30 | ||
31 | #include "cec-priv.h" | 31 | #include "cec-priv.h" |
32 | 32 | ||
33 | static int cec_report_phys_addr(struct cec_adapter *adap, unsigned int la_idx); | ||
34 | static void cec_fill_msg_report_features(struct cec_adapter *adap, | 33 | static void cec_fill_msg_report_features(struct cec_adapter *adap, |
35 | struct cec_msg *msg, | 34 | struct cec_msg *msg, |
36 | unsigned int la_idx); | 35 | unsigned int la_idx); |
@@ -1275,7 +1274,13 @@ configured: | |||
1275 | cec_transmit_msg(adap, &msg, false); | 1274 | cec_transmit_msg(adap, &msg, false); |
1276 | } | 1275 | } |
1277 | 1276 | ||
1278 | cec_report_phys_addr(adap, i); | 1277 | /* Report Physical Address */ |
1278 | cec_msg_report_physical_addr(&msg, adap->phys_addr, | ||
1279 | las->primary_device_type[i]); | ||
1280 | dprintk(2, "config: la %d pa %x.%x.%x.%x\n", | ||
1281 | las->log_addr[i], | ||
1282 | cec_phys_addr_exp(adap->phys_addr)); | ||
1283 | cec_transmit_msg(adap, &msg, false); | ||
1279 | } | 1284 | } |
1280 | mutex_lock(&adap->lock); | 1285 | mutex_lock(&adap->lock); |
1281 | adap->kthread_config = NULL; | 1286 | adap->kthread_config = NULL; |
@@ -1561,22 +1566,6 @@ static void cec_fill_msg_report_features(struct cec_adapter *adap, | |||
1561 | } | 1566 | } |
1562 | } | 1567 | } |
1563 | 1568 | ||
1564 | /* Transmit the Report Physical Address message */ | ||
1565 | static int cec_report_phys_addr(struct cec_adapter *adap, unsigned int la_idx) | ||
1566 | { | ||
1567 | const struct cec_log_addrs *las = &adap->log_addrs; | ||
1568 | struct cec_msg msg = { }; | ||
1569 | |||
1570 | /* Report Physical Address */ | ||
1571 | msg.msg[0] = (las->log_addr[la_idx] << 4) | 0x0f; | ||
1572 | cec_msg_report_physical_addr(&msg, adap->phys_addr, | ||
1573 | las->primary_device_type[la_idx]); | ||
1574 | dprintk(2, "config: la %d pa %x.%x.%x.%x\n", | ||
1575 | las->log_addr[la_idx], | ||
1576 | cec_phys_addr_exp(adap->phys_addr)); | ||
1577 | return cec_transmit_msg(adap, &msg, false); | ||
1578 | } | ||
1579 | |||
1580 | /* Transmit the Feature Abort message */ | 1569 | /* Transmit the Feature Abort message */ |
1581 | static int cec_feature_abort_reason(struct cec_adapter *adap, | 1570 | static int cec_feature_abort_reason(struct cec_adapter *adap, |
1582 | struct cec_msg *msg, u8 reason) | 1571 | struct cec_msg *msg, u8 reason) |