]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: get ports within parsing code
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Fri, 27 Oct 2017 19:55:13 +0000 (15:55 -0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 1 Nov 2017 02:47:02 +0000 (11:47 +0900)
commit4facd92b8ce6795b738249ea7099bb01f21684d3
treea7d74b24003397edc058bd2f80571a9b82eb2480
parentbdb4d6e2423fb29cfe8fb7be29c7f0e7e6114351
net: dsa: get ports within parsing code

There is no point into hiding the -EINVAL error code in ERR_PTR from a
dsa_get_ports function, simply get the "ports" node directly from within
the dsa_parse_ports_dn function.

This also has the effect to make the pdata and device tree handling code
symmetrical inside _dsa_register_switch.

At the same time, rename dsa_parse_ports_dn to dsa_parse_ports_of
because _of is a more common suffix for device tree parsing functions.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/dsa2.c