OSDN Git Service

net: dsa: rework switch parsing
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Fri, 3 Nov 2017 23:05:27 +0000 (19:05 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sun, 5 Nov 2017 13:31:39 +0000 (22:31 +0900)
commit975e6e32215e6cbc09b65d762865b1a46e8e9103
tree93a36b4df42a92294714cbdf8a70e4b23c427be8
parent0eefe2c1730020c6207bc9695fd466e558301dbb
net: dsa: rework switch parsing

When parsing a switch, we have to identify to which tree it belongs and
parse its ports. Provide two functions to separate the OF and platform
data specific paths.

Also use the of_property_read_variable_u32_array function to parse the
OF member array instead of calling of_property_read_u32_index twice.

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