From: Vivien Didelot Date: Fri, 3 Nov 2017 23:05:28 +0000 (-0400) Subject: net: dsa: only check presence of link property X-Git-Tag: v5.15~9988^2~124^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=54df6fa9541752b3b28106eb1a9764dcda815fd2;p=platform%2Fkernel%2Flinux-starfive.git net: dsa: only check presence of link property When parsing a port, simply use of_property_read_bool which checks the presence of a given property, instead of parsing the link phandle. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller --- diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c index dfcb624..06bcdb6 100644 --- a/net/dsa/dsa2.c +++ b/net/dsa/dsa2.c @@ -590,8 +590,8 @@ static int dsa_dst_parse(struct dsa_switch_tree *dst) static int dsa_port_parse_of(struct dsa_port *dp, struct device_node *dn) { struct device_node *ethernet = of_parse_phandle(dn, "ethernet", 0); - struct device_node *link = of_parse_phandle(dn, "link", 0); const char *name = of_get_property(dn, "label", NULL); + bool link = of_property_read_bool(dn, "link"); if (ethernet) { struct net_device *master;