gpu: drm: use for_each_endpoint_of_node()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 30 Jul 2024 00:34:40 +0000 (00:34 +0000)
committerTomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Wed, 7 Aug 2024 07:17:28 +0000 (10:17 +0300)
We already have for_each_endpoint_of_node(), don't use
of_graph_get_next_endpoint() directly. Replace it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/87jzh3lnts.wl-kuninori.morimoto.gx@renesas.com
drivers/gpu/drm/omapdrm/dss/base.c

index 050ca7e..5f8002f 100644 (file)
@@ -242,8 +242,7 @@ static void omapdss_walk_device(struct device *dev, struct device_node *node,
 
        of_node_put(n);
 
-       n = NULL;
-       while ((n = of_graph_get_next_endpoint(node, n)) != NULL) {
+       for_each_endpoint_of_node(node, n) {
                struct device_node *pn = of_graph_get_remote_port_parent(n);
 
                if (!pn)