diff options
author | Kumar Gala <galak@gate.crashing.org> | 2006-01-11 11:27:32 -0800 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2006-01-12 16:31:51 -0500 |
commit | 1d5326774c9245fef77334a9e0f11cd4f8aa7b4e (patch) | |
tree | 20b581ec56b6a336492dd911a19d1d563eed398f /drivers/net/gianfar_mii.c | |
parent | 9c07b884b92c80e9d660b7b9282631fb626451e2 (diff) | |
download | linux-stable-1d5326774c9245fef77334a9e0f11cd4f8aa7b4e.tar.gz linux-stable-1d5326774c9245fef77334a9e0f11cd4f8aa7b4e.tar.bz2 linux-stable-1d5326774c9245fef77334a9e0f11cd4f8aa7b4e.zip |
[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: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net/gianfar_mii.c')
-rw-r--r-- | drivers/net/gianfar_mii.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/gianfar_mii.c b/drivers/net/gianfar_mii.c index 04a462c2a5b7..74e52fcbf806 100644 --- a/drivers/net/gianfar_mii.c +++ b/drivers/net/gianfar_mii.c @@ -128,6 +128,7 @@ 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) @@ -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) { |