diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2020-08-03 22:03:54 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-08-04 03:19:23 +0200 |
commit | 947b6ef9f7aeb2c9ebf63dcd6619068f3cec353a (patch) | |
tree | 5f3608439e932d90fc33c92e4ed0fa0f3373a3aa /drivers/net/dsa/dsa_loop.c | |
parent | net: dsa: loop: Wire-up MTU callbacks (diff) | |
download | linux-947b6ef9f7aeb2c9ebf63dcd6619068f3cec353a.tar.xz linux-947b6ef9f7aeb2c9ebf63dcd6619068f3cec353a.zip |
net: dsa: loop: Set correct number of ports
We only support DSA_LOOP_NUM_PORTS in the switch, do not tell the DSA
core to allocate up to DSA_MAX_PORTS which is nearly the double (6 vs.
11).
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/dsa_loop.c')
-rw-r--r-- | drivers/net/dsa/dsa_loop.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/dsa/dsa_loop.c b/drivers/net/dsa/dsa_loop.c index 6a7d661b5a59..eb600b3dbf26 100644 --- a/drivers/net/dsa/dsa_loop.c +++ b/drivers/net/dsa/dsa_loop.c @@ -275,7 +275,7 @@ static int dsa_loop_drv_probe(struct mdio_device *mdiodev) return -ENOMEM; ds->dev = &mdiodev->dev; - ds->num_ports = DSA_MAX_PORTS; + ds->num_ports = DSA_LOOP_NUM_PORTS; ps = devm_kzalloc(&mdiodev->dev, sizeof(*ps), GFP_KERNEL); if (!ps) |