Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: platform: xilinx: use for_each_endpoint_of_node()

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>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>

authored by

Kuninori Morimoto and committed by
Hans Verkuil
18f9ca7e 7880333a

+2 -7
+2 -7
drivers/media/platform/xilinx/xilinx-vipp.c
··· 199 199 struct media_pad *sink_pad; 200 200 struct xvip_graph_entity *ent; 201 201 struct v4l2_fwnode_link link; 202 - struct device_node *ep = NULL; 202 + struct device_node *ep; 203 203 struct xvip_dma *dma; 204 204 int ret = 0; 205 205 206 206 dev_dbg(xdev->dev, "creating links for DMA engines\n"); 207 207 208 - while (1) { 209 - /* Get the next endpoint and parse its link. */ 210 - ep = of_graph_get_next_endpoint(node, ep); 211 - if (ep == NULL) 212 - break; 213 - 208 + for_each_endpoint_of_node(node, ep) { 214 209 dev_dbg(xdev->dev, "processing endpoint %pOF\n", ep); 215 210 216 211 ret = v4l2_fwnode_parse_link(of_fwnode_handle(ep), &link);