mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
drm/rockchip: drv: use for_each_available_child_of_node for child iterator
Use for_each_available_child_of_node() for iterating over each available child instead of iterating over each child and then checking their status. Change-Id: I5b426116bdef2101d447c553baa5c6c21b016f6e Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
This commit is contained in:
@@ -154,7 +154,7 @@ struct drm_connector *find_connector_by_bridge(struct drm_device *drm_dev,
|
||||
dev_err(drm_dev->dev, "can't found port point!\n");
|
||||
goto err_put_encoder;
|
||||
}
|
||||
for_each_child_of_node(port, endpoint) {
|
||||
for_each_available_child_of_node(port, endpoint) {
|
||||
np_connector = of_graph_get_remote_port_parent(endpoint);
|
||||
if (!np_connector) {
|
||||
dev_err(drm_dev->dev,
|
||||
@@ -727,10 +727,7 @@ static void show_loader_logo(struct drm_device *drm_dev)
|
||||
|
||||
state->acquire_ctx = mode_config->acquire_ctx;
|
||||
|
||||
for_each_child_of_node(root, route) {
|
||||
if (!of_device_is_available(route))
|
||||
continue;
|
||||
|
||||
for_each_available_child_of_node(root, route) {
|
||||
set = of_parse_display_resource(drm_dev, route);
|
||||
if (!set)
|
||||
continue;
|
||||
@@ -1836,7 +1833,7 @@ static void rockchip_add_endpoints(struct device *dev,
|
||||
{
|
||||
struct device_node *ep, *remote;
|
||||
|
||||
for_each_child_of_node(port, ep) {
|
||||
for_each_available_child_of_node(port, ep) {
|
||||
remote = of_graph_get_remote_port_parent(ep);
|
||||
if (!remote || !of_device_is_available(remote)) {
|
||||
of_node_put(remote);
|
||||
|
||||
Reference in New Issue
Block a user