]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/gianfar_mii.c
Merge branch 'upstream-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
[linux-2.6-omap-h63xx.git] / drivers / net / gianfar_mii.c
index 7263395d78bbb6e3ccbf1f128b083f2f7abd16f7..74e52fcbf8064d38186bab71450c57823345cc1c 100644 (file)
@@ -5,7 +5,7 @@
  * Provides Bus interface for MIIM regs
  *
  * Author: Andy Fleming
- * Maintainer: Kumar Gala (kumar.gala@freescale.com)
+ * Maintainer: Kumar Gala
  *
  * Copyright (c) 2002-2004 Freescale Semiconductor, Inc.
  *
@@ -128,12 +128,13 @@ int gfar_mdio_probe(struct device *dev)
        struct gianfar_mdio_data *pdata;
        struct gfar_mii *regs;
        struct mii_bus *new_bus;
+       struct resource *r;
        int err = 0;
 
        if (NULL == dev)
                return -EINVAL;
 
-       new_bus = kmalloc(sizeof(struct mii_bus), GFP_KERNEL);
+       new_bus = kzalloc(sizeof(struct mii_bus), GFP_KERNEL);
 
        if (NULL == new_bus)
                return -ENOMEM;
@@ -151,8 +152,10 @@ int gfar_mdio_probe(struct device *dev)
                return -ENODEV;
        }
 
+       r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+
        /* Set the PHY base address */
-       regs = (struct gfar_mii *) ioremap(pdata->paddr, 
+       regs = (struct gfar_mii *) ioremap(r->start,
                        sizeof (struct gfar_mii));
 
        if (NULL == regs) {