diff options
author | Vivien Didelot | 2017-10-26 11:22:55 -0400 |
---|---|---|
committer | David S. Miller | 2017-10-28 00:00:09 +0900 |
commit | 4a5b85ffe2a001b52d165931ad05d2d620daca3c (patch) | |
tree | e36bcf74ffadedffa5dfc613bfd946e3245733c5 /net/dsa/legacy.c | |
parent | 2b3e9891cb607f7c7d5a4b11fb5a6e775e7f3ef4 (diff) |
net: dsa: use dsa_is_user_port everywhere
Most of the DSA code still check ds->enabled_port_mask directly to
inspect a given port type instead of using the provided dsa_is_user_port
helper. Change this.
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa/legacy.c')
-rw-r--r-- | net/dsa/legacy.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/dsa/legacy.c b/net/dsa/legacy.c index 93c1c43bcc58..0b79c6171d0d 100644 --- a/net/dsa/legacy.c +++ b/net/dsa/legacy.c @@ -190,7 +190,7 @@ static int dsa_switch_setup_one(struct dsa_switch *ds, ds->ports[i].dn = cd->port_dn[i]; ds->ports[i].cpu_dp = dst->cpu_dp; - if (!(ds->enabled_port_mask & (1 << i))) + if (dsa_is_user_port(ds, i)) continue; ret = dsa_slave_create(&ds->ports[i], cd->port_names[i]); @@ -258,7 +258,7 @@ static void dsa_switch_destroy(struct dsa_switch *ds) /* Destroy network devices for physical switch ports. */ for (port = 0; port < ds->num_ports; port++) { - if (!(ds->enabled_port_mask & (1 << port))) + if (!dsa_is_user_port(ds, port)) continue; if (!ds->ports[port].slave) |