Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 54df6fa9 authored by Vivien Didelot's avatar Vivien Didelot Committed by David S. Miller
Browse files

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: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 975e6e32
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;