diff options
author | 2020-09-18 04:07:30 +0300 | |
---|---|---|
committer | 2020-09-18 13:52:34 -0700 | |
commit | e5fb512d81d021b7c7a0c2547c3dafb9de759285 (patch) | |
tree | b0fc2f9e06094d458c05a7017ea47408350fa271 /net/switchdev/switchdev.c | |
parent | net: mscc: ocelot: unregister net devices on unbind (diff) | |
download | wireguard-linux-e5fb512d81d021b7c7a0c2547c3dafb9de759285.tar.xz wireguard-linux-e5fb512d81d021b7c7a0c2547c3dafb9de759285.zip |
net: mscc: ocelot: deinitialize only initialized ports
Currently mscc_ocelot_init_ports() will skip initializing a port when it
doesn't have a phy-handle, so the ocelot->ports[port] pointer will be
NULL. Take this into consideration when tearing down the driver, and add
a new function ocelot_deinit_port() to the switch library, mirror of
ocelot_init_port(), which needs to be called by the driver for all ports
it has initialized.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Tested-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Reviewed-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/switchdev/switchdev.c')
0 files changed, 0 insertions, 0 deletions