diff options
| author | Andrew Lunn <[email protected]> | 2016-06-04 19:16:57 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2016-06-04 21:29:53 +0000 |
| commit | c8b098086b4c744084350d2757a637ad756adf34 (patch) | |
| tree | 0777d99335eff8adf732bd1cb574926b87f9d6c2 /net/dsa/dsa.c | |
| parent | net: dsa: tag_{e}dsa.c: Remove dependency on platform data (diff) | |
| download | kernel-c8b098086b4c744084350d2757a637ad756adf34.tar.gz kernel-c8b098086b4c744084350d2757a637ad756adf34.zip | |
net: dsa: Add a ports structure and use it in the switch structure
There are going to be more per-port members added to the switch
structure. So add a port structure and move the netdev into it.
Signed-off-by: Andrew Lunn <[email protected]>
Reviewed-by: Florian Fainelli <[email protected]>
Reviewed-by: Vivien Didelot <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/dsa/dsa.c')
| -rw-r--r-- | net/dsa/dsa.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c index eff5dfc2e33f..18086e0cc617 100644 --- a/net/dsa/dsa.c +++ b/net/dsa/dsa.c @@ -437,10 +437,10 @@ static void dsa_switch_destroy(struct dsa_switch *ds) if (!(ds->enabled_port_mask & (1 << port))) continue; - if (!ds->ports[port]) + if (!ds->ports[port].netdev) continue; - dsa_slave_destroy(ds->ports[port]); + dsa_slave_destroy(ds->ports[port].netdev); } /* Remove any fixed link PHYs */ @@ -469,7 +469,7 @@ static int dsa_switch_suspend(struct dsa_switch *ds) if (!dsa_is_port_initialized(ds, i)) continue; - ret = dsa_slave_suspend(ds->ports[i]); + ret = dsa_slave_suspend(ds->ports[i].netdev); if (ret) return ret; } @@ -495,7 +495,7 @@ static int dsa_switch_resume(struct dsa_switch *ds) if (!dsa_is_port_initialized(ds, i)) continue; - ret = dsa_slave_resume(ds->ports[i]); + ret = dsa_slave_resume(ds->ports[i].netdev); if (ret) return ret; } |
