summaryrefslogtreecommitdiffstats
path: root/net/dsa/dsa2.c
diff options
context:
space:
mode:
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>2017-11-04 00:05:28 +0100
committerDavid S. Miller <davem@davemloft.net>2017-11-05 14:31:39 +0100
commit54df6fa9541752b3b28106eb1a9764dcda815fd2 (patch)
treeecaefaad8bf8c128fefe65978cf99142437b08dc /net/dsa/dsa2.c
parentnet: dsa: rework switch parsing (diff)
downloadlinux-54df6fa9541752b3b28106eb1a9764dcda815fd2.tar.xz
linux-54df6fa9541752b3b28106eb1a9764dcda815fd2.zip
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 <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa/dsa2.c')
-rw-r--r--net/dsa/dsa2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c
index dfcb6247f2f2..06bcdb6bc796 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;