summaryrefslogtreecommitdiff
path: root/drivers/net/dsa/ocelot/felix.h
diff options
context:
space:
mode:
authorColin Foster <colin.foster@in-advantage.com>2022-04-29 14:30:36 -0700
committerDavid S. Miller <davem@davemloft.net>2022-04-30 13:38:49 +0100
commit2f187bfa6f35cc8bf1626bfc09449a09a6063ea1 (patch)
tree1191c1b8805b5b2a48a24b12f3434627247710a3 /drivers/net/dsa/ocelot/felix.h
parent783d108dd71d97e4cac5fe8ce70ca43ed7dc7bb7 (diff)
net: ethernet: ocelot: remove the need for num_stats initializer
There is a desire to share the oclot_stats_layout struct outside of the current vsc7514 driver. In order to do so, the length of the array needs to be known at compile time, and defined in the struct ocelot and struct felix_info. Since the array is defined in a .c file and would be declared in the header file via: extern struct ocelot_stat_layout[]; the size of the array will not be known at compile time to outside modules. To fix this, remove the need for defining the number of stats at compile time and allow this number to be determined at initialization. Signed-off-by: Colin Foster <colin.foster@in-advantage.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/ocelot/felix.h')
-rw-r--r--drivers/net/dsa/ocelot/felix.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/net/dsa/ocelot/felix.h b/drivers/net/dsa/ocelot/felix.h
index f083b06fdfe9..39faf1027965 100644
--- a/drivers/net/dsa/ocelot/felix.h
+++ b/drivers/net/dsa/ocelot/felix.h
@@ -24,7 +24,6 @@ struct felix_info {
const u32 *port_modes;
int num_mact_rows;
const struct ocelot_stat_layout *stats_layout;
- unsigned int num_stats;
int num_ports;
int num_tx_queues;
struct vcap_props *vcap;