]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: setup and teardown ports
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Mon, 6 Nov 2017 21:11:48 +0000 (16:11 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 9 Nov 2017 00:26:49 +0000 (09:26 +0900)
commit27e21431aae7aab5a9461f74338deaf27f1b2942
tree4d27342910325b453e82f0889d61fc7c4a4b514f
parent7aa5f46a396a782d1b1050ec60ba70b525adfea7
net: dsa: setup and teardown ports

The dsa_dsa_port_apply and dsa_cpu_port_apply functions do exactly the
same. The dsa_user_port_apply function does not try to register a fixed
link but try to create a slave.

This commit factorizes and scopes all that in two convenient
dsa_port_setup and dsa_port_teardown functions.

It won't hurt to register a devlink_port for unused port as well.

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