Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Hans Verkuil and committed by
Mauro Carvalho Chehab
d3d64bc7 52bc30fd

+7 -18
+7 -18
drivers/media/cec/cec-adap.c
··· 30 30 31 31 #include "cec-priv.h" 32 32 33 - static int cec_report_phys_addr(struct cec_adapter *adap, unsigned int la_idx); 34 33 static void cec_fill_msg_report_features(struct cec_adapter *adap, 35 34 struct cec_msg *msg, 36 35 unsigned int la_idx); ··· 1274 1275 cec_transmit_msg(adap, &msg, false); 1275 1276 } 1276 1277 1277 - cec_report_phys_addr(adap, i); 1278 + /* Report Physical Address */ 1279 + cec_msg_report_physical_addr(&msg, adap->phys_addr, 1280 + las->primary_device_type[i]); 1281 + dprintk(2, "config: la %d pa %x.%x.%x.%x\n", 1282 + las->log_addr[i], 1283 + cec_phys_addr_exp(adap->phys_addr)); 1284 + cec_transmit_msg(adap, &msg, false); 1278 1285 } 1279 1286 mutex_lock(&adap->lock); 1280 1287 adap->kthread_config = NULL; ··· 1564 1559 op_is_dev_features = true; 1565 1560 } 1566 1561 } 1567 - } 1568 - 1569 - /* Transmit the Report Physical Address message */ 1570 - static int cec_report_phys_addr(struct cec_adapter *adap, unsigned int la_idx) 1571 - { 1572 - const struct cec_log_addrs *las = &adap->log_addrs; 1573 - struct cec_msg msg = { }; 1574 - 1575 - /* Report Physical Address */ 1576 - msg.msg[0] = (las->log_addr[la_idx] << 4) | 0x0f; 1577 - cec_msg_report_physical_addr(&msg, adap->phys_addr, 1578 - las->primary_device_type[la_idx]); 1579 - dprintk(2, "config: la %d pa %x.%x.%x.%x\n", 1580 - las->log_addr[la_idx], 1581 - cec_phys_addr_exp(adap->phys_addr)); 1582 - return cec_transmit_msg(adap, &msg, false); 1583 1562 } 1584 1563 1585 1564 /* Transmit the Feature Abort message */