mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
of: Add of-graph helpers to loop over endpoints and find ports by id
This series converts of_graph_get_next_endpoint to decrement the refcount of the passed prev parameter. This allows to add a for_each_endpoint_of_node helper macro to loop over all endpoints in a device tree node. The of_graph_get_port_by_id function is added to retrieve a port by its known port id (contained in the reg property) from the device tree. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJU9Vn9AAoJEFDCiBxwnmDriPMP/2Bzx7kYdRkTFICqGsITHcUf pjMEf7htHdg+lFn6jBYtLW42NqZMX+kI1BIpd6RzEjKxAhbp0tr7FVwn0Kds2rQw 6ikwtZsd6oBR61Xv0sZWMwNbfn2MUcl7M9k+Sh6kDUBph5IEMZ5F+n8dRYHhA+MH rs9PGTH2DmRE1HXvWBjsE8QVgfia4WRp5OipDkOxNhCpkbzU4XqbVoBh/6BmJ54R Dxq3srM479CyRY3o4+KT4ajhS7g4aU7WTQMxIXtU0cLcYMvfkcHoYwNBw+bjSn3s eYfjpw96XHhS4abVzo8QziN1oNV/i/Y4wpqIOKwY5TnA+Gt+sEnFXjGHa331QdpL WdisAQg/6MFPlR4D7gkBWEjoeeMn4FkyiFSHntYclywOxv/Cbc/l1cOyPkS3zxIa v6KH7zu5J83sICx8TlZv0YLnES1GtixCuWukaKzyLiAXqHVGullkBvUauQwRrtEW 73CjIGpCTQMY5xmt/8V8JFi1HQLbDBRlHkX2WOzcrByLLgiGaUeKRvjYcYtaBm7q Q25E10lnW3cGf+kljlPfc3NVxgtQUGaQKsx+wzICnz6h+0gdEzsTcAWB3Qp891jX q+RSqEsT93oSAhPxJYQGvEu4wPfmOrh7QvProwj8mR1Jp6TyvgGi9pOtHU+YwOz+ EZD+c6mhdOfuWgD8GqT/ =jtB3 -----END PGP SIGNATURE----- Merge tag 'of-graph-for-4.0' of git://git.pengutronix.de/git/pza/linux into for-next Pull of-graph helpers from Philipp Zabel: of: Add of-graph helpers to loop over endpoints and find ports by id This series converts of_graph_get_next_endpoint to decrement the refcount of the passed prev parameter. This allows to add a for_each_endpoint_of_node helper macro to loop over all endpoints in a device tree node. The of_graph_get_port_by_id function is added to retrieve a port by its known port id (contained in the reg property) from the device tree.
This commit is contained in:
commit
8147e2e8f1
8 changed files with 61 additions and 48 deletions
|
|
@ -164,20 +164,15 @@ static void __init omapdss_walk_device(struct device_node *node, bool root)
|
|||
|
||||
pn = of_graph_get_remote_port_parent(n);
|
||||
|
||||
if (!pn) {
|
||||
of_node_put(n);
|
||||
if (!pn)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!of_device_is_available(pn) || omapdss_list_contains(pn)) {
|
||||
of_node_put(pn);
|
||||
of_node_put(n);
|
||||
continue;
|
||||
}
|
||||
|
||||
omapdss_walk_device(pn, false);
|
||||
|
||||
of_node_put(n);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue