Merge remote branch 'origin' into secretlab/next-devicetree
[safe/jmp/linux-2.6] / drivers / net / fec_mpc52xx_phy.c
index 31e6d62..006f64d 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/netdevice.h>
 #include <linux/phy.h>
 #include <linux/of_platform.h>
+#include <linux/slab.h>
 #include <linux/of_mdio.h>
 #include <asm/io.h>
 #include <asm/mpc52xx.h>
@@ -65,7 +66,7 @@ static int mpc52xx_fec_mdio_probe(struct of_device *of,
                const struct of_device_id *match)
 {
        struct device *dev = &of->dev;
-       struct device_node *np = of->node;
+       struct device_node *np = of->dev.of_node;
        struct mii_bus *bus;
        struct mpc52xx_fec_mdio_priv *priv;
        struct resource res = {};
@@ -106,7 +107,7 @@ static int mpc52xx_fec_mdio_probe(struct of_device *of,
 
        /* set MII speed */
        out_be32(&priv->regs->mii_speed,
-               ((mpc5xxx_get_bus_frequency(of->node) >> 20) / 5) << 1);
+               ((mpc5xxx_get_bus_frequency(of->dev.of_node) >> 20) / 5) << 1);
 
        err = of_mdiobus_register(bus, np);
        if (err)
@@ -155,12 +156,16 @@ static struct of_device_id mpc52xx_fec_mdio_match[] = {
        { .compatible = "mpc5200b-fec-phy", },
        {}
 };
+MODULE_DEVICE_TABLE(of, mpc52xx_fec_mdio_match);
 
 struct of_platform_driver mpc52xx_fec_mdio_driver = {
-       .name = "mpc5200b-fec-phy",
+       .driver = {
+               .name = "mpc5200b-fec-phy",
+               .owner = THIS_MODULE,
+               .of_match_table = mpc52xx_fec_mdio_match,
+       },
        .probe = mpc52xx_fec_mdio_probe,
        .remove = mpc52xx_fec_mdio_remove,
-       .match_table = mpc52xx_fec_mdio_match,
 };
 
 /* let fec driver call it, since this has to be registered before it */