Commit 1d532677 authored by Kumar Gala's avatar Kumar Gala Committed by Jeff Garzik

[PATCH] gianfar mii: Use proper resource for MII memory region

We can now have the gianfar mii platform device have a proper resource for the
IO memory region for its registers.  Previously we passed this information
that the platform_data structure because we couldn't handle overlapping memory
regions for platform devices.
Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarJeff Garzik <jgarzik@pobox.com>
parent 9c07b884
...@@ -128,6 +128,7 @@ int gfar_mdio_probe(struct device *dev) ...@@ -128,6 +128,7 @@ int gfar_mdio_probe(struct device *dev)
struct gianfar_mdio_data *pdata; struct gianfar_mdio_data *pdata;
struct gfar_mii *regs; struct gfar_mii *regs;
struct mii_bus *new_bus; struct mii_bus *new_bus;
struct resource *r;
int err = 0; int err = 0;
if (NULL == dev) if (NULL == dev)
...@@ -151,8 +152,10 @@ int gfar_mdio_probe(struct device *dev) ...@@ -151,8 +152,10 @@ int gfar_mdio_probe(struct device *dev)
return -ENODEV; return -ENODEV;
} }
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
/* Set the PHY base address */ /* Set the PHY base address */
regs = (struct gfar_mii *) ioremap(pdata->paddr, regs = (struct gfar_mii *) ioremap(r->start,
sizeof (struct gfar_mii)); sizeof (struct gfar_mii));
if (NULL == regs) { if (NULL == regs) {
......
...@@ -55,9 +55,6 @@ struct gianfar_platform_data { ...@@ -55,9 +55,6 @@ struct gianfar_platform_data {
}; };
struct gianfar_mdio_data { struct gianfar_mdio_data {
/* device specific information */
u32 paddr;
/* board specific information */ /* board specific information */
int irq[32]; int irq[32];
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment