]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/ucc_geth_mii.c
r8169: revert "read MAC address from EEPROM on init"
[linux-2.6-omap-h63xx.git] / drivers / net / ucc_geth_mii.c
index 6d9e7ad9fda9369b594ee73965e3967d4a1900e7..c001d261366b84c3ffe782b7f2f6d216107b94de 100644 (file)
@@ -141,8 +141,7 @@ static int uec_mdio_probe(struct of_device *ofdev, const struct of_device_id *ma
        struct resource res;
        int k, err = 0;
 
-       new_bus = kzalloc(sizeof(struct mii_bus), GFP_KERNEL);
-
+       new_bus = mdiobus_alloc();
        if (NULL == new_bus)
                return -ENOMEM;
 
@@ -187,7 +186,7 @@ static int uec_mdio_probe(struct of_device *ofdev, const struct of_device_id *ma
 
        new_bus->priv = (void __force *)regs;
 
-       new_bus->dev = device;
+       new_bus->parent = device;
        dev_set_drvdata(device, new_bus);
 
        /* Read MII management master from device tree */
@@ -235,7 +234,7 @@ bus_register_fail:
 ioremap_fail:
        kfree(new_bus->irq);
 reg_map_fail:
-       kfree(new_bus);
+       mdiobus_free(new_bus);
 
        return err;
 }
@@ -251,7 +250,7 @@ static int uec_mdio_remove(struct of_device *ofdev)
 
        iounmap((void __iomem *)bus->priv);
        bus->priv = NULL;
-       kfree(bus);
+       mdiobus_free(bus);
 
        return 0;
 }