net: dsa: remove dsa_switch_alloc helper
[linux-2.6-microblaze.git] / drivers / net / dsa / dsa_loop.c
index 925ed13..c8d7ef2 100644 (file)
@@ -286,10 +286,13 @@ static int dsa_loop_drv_probe(struct mdio_device *mdiodev)
        dev_info(&mdiodev->dev, "%s: 0x%0x\n",
                 pdata->name, pdata->enabled_ports);
 
-       ds = dsa_switch_alloc(&mdiodev->dev, DSA_MAX_PORTS);
+       ds = devm_kzalloc(&mdiodev->dev, sizeof(*ds), GFP_KERNEL);
        if (!ds)
                return -ENOMEM;
 
+       ds->dev = &mdiodev->dev;
+       ds->num_ports = DSA_MAX_PORTS;
+
        ps = devm_kzalloc(&mdiodev->dev, sizeof(*ps), GFP_KERNEL);
        if (!ps)
                return -ENOMEM;