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.

fbdev: omapfb: 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>
Acked-by: Helge Deller <deller@gmx.de>
Link: https://lore.kernel.org/r/87bjzab5sd.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)
78cd57bb c005d377

+13 -87
+2 -1
drivers/video/fbdev/omap2/omapfb/dss/dpi.c
··· 20 20 #include <linux/regulator/consumer.h> 21 21 #include <linux/string.h> 22 22 #include <linux/of.h> 23 + #include <linux/of_graph.h> 23 24 #include <linux/clk.h> 24 25 #include <linux/component.h> 25 26 ··· 846 845 if (!dpi) 847 846 return -ENOMEM; 848 847 849 - ep = omapdss_of_get_next_endpoint(port, NULL); 848 + ep = of_graph_get_next_port_endpoint(port, NULL); 850 849 if (!ep) 851 850 return 0; 852 851
-66
drivers/video/fbdev/omap2/omapfb/dss/dss-of.c
··· 15 15 16 16 #include "dss.h" 17 17 18 - struct device_node * 19 - omapdss_of_get_next_port(const struct device_node *parent, 20 - struct device_node *prev) 21 - { 22 - struct device_node *port = NULL; 23 - 24 - if (!parent) 25 - return NULL; 26 - 27 - if (!prev) { 28 - struct device_node *ports; 29 - /* 30 - * It's the first call, we have to find a port subnode 31 - * within this node or within an optional 'ports' node. 32 - */ 33 - ports = of_get_child_by_name(parent, "ports"); 34 - if (ports) 35 - parent = ports; 36 - 37 - port = of_get_child_by_name(parent, "port"); 38 - 39 - /* release the 'ports' node */ 40 - of_node_put(ports); 41 - } else { 42 - struct device_node *ports; 43 - 44 - ports = of_get_parent(prev); 45 - if (!ports) 46 - return NULL; 47 - 48 - do { 49 - port = of_get_next_child(ports, prev); 50 - if (!port) { 51 - of_node_put(ports); 52 - return NULL; 53 - } 54 - prev = port; 55 - } while (!of_node_name_eq(port, "port")); 56 - 57 - of_node_put(ports); 58 - } 59 - 60 - return port; 61 - } 62 - EXPORT_SYMBOL_GPL(omapdss_of_get_next_port); 63 - 64 - struct device_node * 65 - omapdss_of_get_next_endpoint(const struct device_node *parent, 66 - struct device_node *prev) 67 - { 68 - struct device_node *ep = NULL; 69 - 70 - if (!parent) 71 - return NULL; 72 - 73 - do { 74 - ep = of_get_next_child(parent, prev); 75 - if (!ep) 76 - return NULL; 77 - prev = ep; 78 - } while (!of_node_name_eq(ep, "endpoint")); 79 - 80 - return ep; 81 - } 82 - EXPORT_SYMBOL_GPL(omapdss_of_get_next_endpoint); 83 - 84 18 struct device_node *dss_of_port_get_parent_device(struct device_node *port) 85 19 { 86 20 struct device_node *np;
+9 -11
drivers/video/fbdev/omap2/omapfb/dss/dss.c
··· 26 26 #include <linux/mfd/syscon.h> 27 27 #include <linux/regmap.h> 28 28 #include <linux/of.h> 29 + #include <linux/of_graph.h> 29 30 #include <linux/regulator/consumer.h> 30 31 #include <linux/suspend.h> 31 32 #include <linux/component.h> ··· 920 919 struct device_node *port; 921 920 int r, ret = 0; 922 921 923 - if (parent == NULL) 924 - return 0; 925 - 926 - port = omapdss_of_get_next_port(parent, NULL); 922 + port = of_graph_get_next_port(parent, NULL); 927 923 if (!port) 928 924 return 0; 929 925 ··· 950 952 default: 951 953 break; 952 954 } 953 - } while (!ret && 954 - (port = omapdss_of_get_next_port(parent, port)) != NULL); 955 + 956 + port = of_graph_get_next_port(parent, port); 957 + } while (!ret && port); 955 958 956 959 if (ret) 957 960 dss_uninit_ports(pdev); ··· 965 966 struct device_node *parent = pdev->dev.of_node; 966 967 struct device_node *port; 967 968 968 - if (parent == NULL) 969 - return; 970 - 971 - port = omapdss_of_get_next_port(parent, NULL); 969 + port = of_graph_get_next_port(parent, NULL); 972 970 if (!port) 973 971 return; 974 972 ··· 996 1000 default: 997 1001 break; 998 1002 } 999 - } while ((port = omapdss_of_get_next_port(parent, port)) != NULL); 1003 + 1004 + port = of_graph_get_next_port(parent, port); 1005 + } while (port); 1000 1006 } 1001 1007 1002 1008 static int dss_video_pll_probe(struct platform_device *pdev)
+2 -1
drivers/video/fbdev/omap2/omapfb/dss/sdi.c
··· 16 16 #include <linux/platform_device.h> 17 17 #include <linux/string.h> 18 18 #include <linux/of.h> 19 + #include <linux/of_graph.h> 19 20 #include <linux/component.h> 20 21 21 22 #include <video/omapfb_dss.h> ··· 406 405 u32 datapairs; 407 406 int r; 408 407 409 - ep = omapdss_of_get_next_endpoint(port, NULL); 408 + ep = of_graph_get_next_port_endpoint(port, NULL); 410 409 if (!ep) 411 410 return 0; 412 411
-8
include/video/omapfb_dss.h
··· 811 811 return dssdev->state == OMAP_DSS_DISPLAY_ACTIVE; 812 812 } 813 813 814 - struct device_node * 815 - omapdss_of_get_next_port(const struct device_node *parent, 816 - struct device_node *prev); 817 - 818 - struct device_node * 819 - omapdss_of_get_next_endpoint(const struct device_node *parent, 820 - struct device_node *prev); 821 - 822 814 struct omap_dss_device * 823 815 omapdss_of_find_source_for_first_ep(struct device_node *node); 824 816 #else