diff options
author | Vivien Didelot <vivien.didelot@savoirfairelinux.com> | 2017-10-26 11:22:55 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-28 00:00:09 +0900 |
commit | 4a5b85ffe2a001b52d165931ad05d2d620daca3c (patch) | |
tree | e36bcf74ffadedffa5dfc613bfd946e3245733c5 /net/dsa/dsa.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/dsa.c')
-rw-r--r-- | net/dsa/dsa.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c index a3abf7a7b9a2..fe0081730305 100644 --- a/net/dsa/dsa.c +++ b/net/dsa/dsa.c @@ -201,7 +201,7 @@ static int dsa_switch_rcv(struct sk_buff *skb, struct net_device *dev, #ifdef CONFIG_PM_SLEEP static bool dsa_is_port_initialized(struct dsa_switch *ds, int p) { - return ds->enabled_port_mask & (1 << p) && ds->ports[p].slave; + return dsa_is_user_port(ds, p) && ds->ports[p].slave; } int dsa_switch_suspend(struct dsa_switch *ds) |