diff options
author | Vivien Didelot <vivien.didelot@savoirfairelinux.com> | 2016-04-17 13:24:01 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-04-17 18:54:15 -0400 |
commit | 009a2b9843bf0b1a85fbf79f76e1de4995de527c (patch) | |
tree | 3f4115c51b462c8af9380f535df32a5e91814190 /drivers/net/dsa/mv88e6352.c | |
parent | 22356476a86fc569c34cbf209d3a247c01e0ef6d (diff) |
net: dsa: mv88e6xxx: add number of ports to info
Drop the ps->num_ports variable in favor of a new member of the info
structure. This removes the need to assign it at setup time.
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/mv88e6352.c')
-rw-r--r-- | drivers/net/dsa/mv88e6352.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/dsa/mv88e6352.c b/drivers/net/dsa/mv88e6352.c index bae62eb9c3b5..12b9a7b5cb31 100644 --- a/drivers/net/dsa/mv88e6352.c +++ b/drivers/net/dsa/mv88e6352.c @@ -27,26 +27,32 @@ static const struct mv88e6xxx_info mv88e6352_table[] = { .prod_num = PORT_SWITCH_ID_PROD_NUM_6320, .family = MV88E6XXX_FAMILY_6320, .name = "Marvell 88E6320", + .num_ports = 7, }, { .prod_num = PORT_SWITCH_ID_PROD_NUM_6321, .family = MV88E6XXX_FAMILY_6320, .name = "Marvell 88E6321", + .num_ports = 7, }, { .prod_num = PORT_SWITCH_ID_PROD_NUM_6172, .family = MV88E6XXX_FAMILY_6352, .name = "Marvell 88E6172", + .num_ports = 7, }, { .prod_num = PORT_SWITCH_ID_PROD_NUM_6176, .family = MV88E6XXX_FAMILY_6352, .name = "Marvell 88E6176", + .num_ports = 7, }, { .prod_num = PORT_SWITCH_ID_PROD_NUM_6240, .family = MV88E6XXX_FAMILY_6352, .name = "Marvell 88E6240", + .num_ports = 7, }, { .prod_num = PORT_SWITCH_ID_PROD_NUM_6352, .family = MV88E6XXX_FAMILY_6352, .name = "Marvell 88E6352", + .num_ports = 7, } }; @@ -104,8 +110,6 @@ static int mv88e6352_setup(struct dsa_switch *ds) if (ret < 0) return ret; - ps->num_ports = 7; - mutex_init(&ps->eeprom_mutex); ret = mv88e6xxx_switch_reset(ds, true); |