net: dsa: use ds->num_ports when possible
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Fri, 27 Jan 2017 20:29:37 +0000 (15:29 -0500)
committerDavid S. Miller <davem@davemloft.net>
Sun, 29 Jan 2017 23:42:46 +0000 (18:42 -0500)
commit26895e299cfb583d304553e9c259e694a7e83397
tree84efe62291aa646b75bb4778db06644e2062fb74
parenta0c02161ecfc2f40a0837926efac5376bc6fd6d3
net: dsa: use ds->num_ports when possible

The dsa_switch structure contains the number of ports. Use it where the
structure is valid instead of the DSA_MAX_PORTS value.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/dsa.c
net/dsa/dsa2.c
net/dsa/slave.c
net/dsa/tag_brcm.c
net/dsa/tag_dsa.c
net/dsa/tag_edsa.c
net/dsa/tag_trailer.c