device connection: Remove struct device_connection

Since the connection descriptors can't be stored into the
list anymore, there is no need for the data structure.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20200904125123.83725-4-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Heikki Krogerus
2020-09-04 15:51:22 +03:00
committed by Greg Kroah-Hartman
parent 87ea592624
commit f5514c91e9
4 changed files with 25 additions and 44 deletions

View File

@@ -13,17 +13,17 @@ static void *
fwnode_graph_devcon_match(struct fwnode_handle *fwnode, const char *con_id,
void *data, devcon_match_fn_t match)
{
struct device_connection con = { .id = con_id };
struct fwnode_handle *node;
struct fwnode_handle *ep;
void *ret;
fwnode_graph_for_each_endpoint(fwnode, ep) {
con.fwnode = fwnode_graph_get_remote_port_parent(ep);
if (!fwnode_device_is_available(con.fwnode))
node = fwnode_graph_get_remote_port_parent(ep);
if (!fwnode_device_is_available(node))
continue;
ret = match(&con, -1, data);
fwnode_handle_put(con.fwnode);
ret = match(node, con_id, data);
fwnode_handle_put(node);
if (ret) {
fwnode_handle_put(ep);
return ret;
@@ -36,17 +36,17 @@ static void *
fwnode_devcon_match(struct fwnode_handle *fwnode, const char *con_id,
void *data, devcon_match_fn_t match)
{
struct device_connection con = { };
struct fwnode_handle *node;
void *ret;
int i;
for (i = 0; ; i++) {
con.fwnode = fwnode_find_reference(fwnode, con_id, i);
if (IS_ERR(con.fwnode))
node = fwnode_find_reference(fwnode, con_id, i);
if (IS_ERR(node))
break;
ret = match(&con, -1, data);
fwnode_handle_put(con.fwnode);
ret = match(node, NULL, data);
fwnode_handle_put(node);
if (ret)
return ret;
}