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

Configure Feed

Select the types of activity you want to include in your feed.

media: xilinx-tpg: use new of_graph functions

Now we can use new port related functions for port parsing. Use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Link: https://lore.kernel.org/r/87a5eub5s8.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>

authored by

Kuninori Morimoto and committed by
Rob Herring (Arm)
393194cd 78cd57bb

+3 -11
+3 -11
drivers/media/platform/xilinx/xilinx-tpg.c
··· 13 13 #include <linux/gpio/consumer.h> 14 14 #include <linux/module.h> 15 15 #include <linux/of.h> 16 + #include <linux/of_graph.h> 16 17 #include <linux/platform_device.h> 17 18 #include <linux/xilinx-v4l2-controls.h> 18 19 ··· 712 711 { 713 712 struct device *dev = xtpg->xvip.dev; 714 713 struct device_node *node = xtpg->xvip.dev->of_node; 715 - struct device_node *ports; 716 - struct device_node *port; 717 714 unsigned int nports = 0; 718 715 bool has_endpoint = false; 719 716 720 - ports = of_get_child_by_name(node, "ports"); 721 - if (ports == NULL) 722 - ports = node; 723 - 724 - for_each_child_of_node(ports, port) { 717 + for_each_of_graph_port(node, port) { 725 718 const struct xvip_video_format *format; 726 719 struct device_node *endpoint; 727 - 728 - if (!of_node_name_eq(port, "port")) 729 - continue; 730 720 731 721 format = xvip_of_get_format(port); 732 722 if (IS_ERR(format)) { ··· 736 744 } 737 745 738 746 if (nports == 0) { 739 - endpoint = of_get_next_child(port, NULL); 747 + endpoint = of_graph_get_next_port_endpoint(port, NULL); 740 748 if (endpoint) 741 749 has_endpoint = true; 742 750 of_node_put(endpoint);