aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2016-06-04 21:16:59 +0200
committerDavid S. Miller <davem@davemloft.net>2016-06-04 14:29:53 -0700
commit4a7704ffa86705b0580b6473c407b7b7618e072d (patch)
treeea9483934d983ffb5f00c22f9b1aa6b881b6b71c /include
parentnet: dsa: Move port device node into port structure (diff)
downloadlinux-dev-4a7704ffa86705b0580b6473c407b7b7618e072d.tar.xz
linux-dev-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')
-rw-r--r--include/net/dsa.h9
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 {