]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/platforms/pasemi/gpio_mdio.c
phylib: two dynamic mii_bus allocation fallout fixes
[linux-2.6-omap-h63xx.git] / arch / powerpc / platforms / pasemi / gpio_mdio.c
index 798c7abe16047359c99fac8d6d5ca82c622e19a6..75cc165d5bee6e73f0a07dc38edd60dcf442941d 100644 (file)
@@ -230,7 +230,7 @@ static int __devinit gpio_mdio_probe(struct of_device *ofdev,
        if (!priv)
                goto out;
 
-       new_bus = kzalloc(sizeof(struct mii_bus), GFP_KERNEL);
+       new_bus = mdiobus_alloc();
 
        if (!new_bus)
                goto out_free_priv;
@@ -306,7 +306,7 @@ static int gpio_mdio_remove(struct of_device *dev)
 
        kfree(bus->priv);
        bus->priv = NULL;
-       kfree(bus);
+       mdiobus_free(bus);
 
        return 0;
 }