link_subtype = csdev->subtype.link_subtype;
if (link_subtype == CORESIGHT_DEV_SUBTYPE_LINK_MERG) {
- nr_conns = csdev->pdata->nr_inconns;
+ nr_conns = csdev->pdata->high_inport;
} else if (link_subtype == CORESIGHT_DEV_SUBTYPE_LINK_SPLIT) {
- nr_conns = csdev->pdata->nr_outconns;
+ nr_conns = csdev->pdata->high_outport;
} else {
nr_conns = 1;
}
for (i = 0; i < i_csdev->pdata->nr_outconns; i++) {
conn = &i_csdev->pdata->out_conns[i];
- /* Skip the port if FW doesn't describe it */
- if (!conn->dest_fwnode)
- continue;
/* We have found at least one orphan connection */
if (conn->dest_dev == NULL) {
/* Does it match this newly added device? */
for (i = 0; i < csdev->pdata->nr_outconns; i++) {
struct coresight_connection *conn = &csdev->pdata->out_conns[i];
- if (!conn->dest_fwnode)
- continue;
conn->dest_dev =
coresight_find_csdev_by_fwnode(conn->dest_fwnode);
if (conn->dest_dev && conn->dest_dev->has_conns_grp) {
for (i = 0; i < iterator->pdata->nr_outconns; i++) {
conn = &iterator->pdata->out_conns[i];
- if (conn->dest_dev == NULL || conn->dest_fwnode == NULL)
+ if (conn->dest_dev == NULL)
continue;
if (csdev->dev.fwnode == conn->dest_fwnode) {
* doesn't have at least one input port, there is no point
* in searching all the devices.
*/
- if (csdev->pdata->nr_inconns)
+ if (csdev->pdata->high_inport)
bus_for_each_dev(&coresight_bustype, NULL,
csdev, coresight_remove_match);
}
* Drop the refcount and clear the handle as this device
* is going away
*/
- if (conns[i].dest_fwnode) {
- fwnode_handle_put(conns[i].dest_fwnode);
- conns[i].dest_fwnode = NULL;
- }
+ fwnode_handle_put(conns[i].dest_fwnode);
+ conns[i].dest_fwnode = NULL;
}
if (csdev)
coresight_remove_conns_sysfs_group(csdev);
link_subtype = desc->subtype.link_subtype;
if (link_subtype == CORESIGHT_DEV_SUBTYPE_LINK_MERG)
- nr_refcnts = desc->pdata->nr_inconns;
+ nr_refcnts = desc->pdata->high_inport;
else if (link_subtype == CORESIGHT_DEV_SUBTYPE_LINK_SPLIT)
- nr_refcnts = desc->pdata->nr_outconns;
+ nr_refcnts = desc->pdata->high_outport;
}
refcnts = kcalloc(nr_refcnts, sizeof(*refcnts), GFP_KERNEL);