diff options
author | Andrew Lunn <andrew@lunn.ch> | 2016-06-04 21:16:59 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-06-04 14:29:53 -0700 |
commit | 4a7704ffa86705b0580b6473c407b7b7618e072d (patch) | |
tree | ea9483934d983ffb5f00c22f9b1aa6b881b6b71c /include/net/dsa.h | |
parent | 189b0d93ec61e1f991e96d7bc03b03cf929d164c (diff) | |
download | talos-obmc-linux-4a7704ffa86705b0580b6473c407b7b7618e072d.tar.gz talos-obmc-linux-4a7704ffa86705b0580b6473c407b7b7618e072d.zip |
net: dsa: Remove dynamic allocate of routing table
With a maximum of four switches, the size of the routing table is the
same as the pointer to it. Removing it makes the code simpler.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/dsa.h')
-rw-r--r-- | include/net/dsa.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/include/net/dsa.h b/include/net/dsa.h index 8314197d028f..4e3afa9648ca 100644 --- a/include/net/dsa.h +++ b/include/net/dsa.h @@ -58,12 +58,11 @@ struct dsa_chip_data { struct device_node *port_dn[DSA_MAX_PORTS]; /* - * An array (with nr_chips elements) of which element [a] - * indicates which port on this switch should be used to - * send packets to that are destined for switch a. Can be - * NULL if there is only one switch chip. + * An array of which element [a] indicates which port on this + * switch should be used to send packets to that are destined + * for switch a. Can be NULL if there is only one switch chip. */ - s8 *rtable; + s8 rtable[DSA_MAX_SWITCHES]; }; struct dsa_platform_data { |