net: dsa: move dsa slave destroy code to slave.c
commitcda5c15b23fb9d683a491e8bd137d11d8552ac02
authorNeil Armstrong <narmstrong@baylibre.com>
Mon, 7 Dec 2015 12:57:35 +0000 (7 13:57 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 7 Dec 2015 21:35:50 +0000 (7 16:35 -0500)
tree795c5b3cb40f66415c0237c7602026b08ff78b18
parent679fb46c57859b59a70257477bfbdfc7edfac4f5
net: dsa: move dsa slave destroy code to slave.c

Move dsa slave dedicated code from dsa_switch_destroy to a new
dsa_slave_destroy function in slave.c.
Add the netif_carrier_off and phy_disconnect calls in order to
correctly cleanup the netdev state and PHY state machine.

Signed-off-by: Frode Isaksen <fisaksen@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/dsa.c
net/dsa/dsa_priv.h
net/dsa/slave.c