]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/net/ucc_geth_mii.c
bnx2x: convert to net_device_ops
[karo-tx-linux.git] / drivers / net / ucc_geth_mii.c
index 75b72fe1f23cf5ad72a57e805d98964e5f1e5ca0..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;
 
@@ -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;
 }