From 009a2b9843bf0b1a85fbf79f76e1de4995de527c Mon Sep 17 00:00:00 2001 From: Vivien Didelot Date: Sun, 17 Apr 2016 13:24:01 -0400 Subject: 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 Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller --- drivers/net/dsa/mv88e6352.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'drivers/net/dsa/mv88e6352.c') 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); -- cgit v1.2.3