diff options
author | 2017-03-30 17:37:10 -0400 | |
---|---|---|
committer | 2017-04-01 12:22:57 -0700 | |
commit | 73b1204d070d2970749beb3fa3ca6e639dc7a3b6 (patch) | |
tree | 94fb308feaf6fb4fc3533b8d04cb71a0753e2cf2 /drivers/net/dsa/mv88e6xxx/chip.c | |
parent | net: dsa: mv88e6xxx: program the PVT with all ones (diff) | |
download | linux-73b1204d070d2970749beb3fa3ca6e639dc7a3b6.tar.gz linux-73b1204d070d2970749beb3fa3ca6e639dc7a3b6.tar.bz2 linux-73b1204d070d2970749beb3fa3ca6e639dc7a3b6.zip |
net: dsa: mv88e6xxx: allocate the number of ports
The current code allocates DSA_MAX_PORTS ports for a Marvell dsa_switch
structure. Provide the exact number of ports so the corresponding
ds->num_ports is accurate.
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/mv88e6xxx/chip.c')
-rw-r--r-- | drivers/net/dsa/mv88e6xxx/chip.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index fb6a723c2137..28bdfadbf050 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -4286,7 +4286,7 @@ static int mv88e6xxx_register_switch(struct mv88e6xxx_chip *chip) struct device *dev = chip->dev; struct dsa_switch *ds; - ds = dsa_switch_alloc(dev, DSA_MAX_PORTS); + ds = dsa_switch_alloc(dev, mv88e6xxx_num_ports(chip)); if (!ds) return -ENOMEM; |