Skip to content

Commit 947b6ef

Browse files
ffainellidavem330
authored andcommitted
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 <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent c99194e commit 947b6ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/dsa/dsa_loop.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ static int dsa_loop_drv_probe(struct mdio_device *mdiodev)
275275
return -ENOMEM;
276276

277277
ds->dev = &mdiodev->dev;
278-
ds->num_ports = DSA_MAX_PORTS;
278+
ds->num_ports = DSA_LOOP_NUM_PORTS;
279279

280280
ps = devm_kzalloc(&mdiodev->dev, sizeof(*ps), GFP_KERNEL);
281281
if (!ps)

0 commit comments

Comments
 (0)