Commit 947b6ef9 authored by Florian Fainelli's avatar Florian Fainelli Committed by David S. Miller

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: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c99194ed
...@@ -275,7 +275,7 @@ static int dsa_loop_drv_probe(struct mdio_device *mdiodev) ...@@ -275,7 +275,7 @@ static int dsa_loop_drv_probe(struct mdio_device *mdiodev)
return -ENOMEM; return -ENOMEM;
ds->dev = &mdiodev->dev; 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); ps = devm_kzalloc(&mdiodev->dev, sizeof(*ps), GFP_KERNEL);
if (!ps) if (!ps)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment