aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorKumar Gala <galak@gate.crashing.org>2006-01-11 14:27:32 -0500
committerJeff Garzik <jgarzik@pobox.com>2006-01-12 16:31:51 -0500
commit1d5326774c9245fef77334a9e0f11cd4f8aa7b4e (patch)
tree20b581ec56b6a336492dd911a19d1d563eed398f /drivers/net
parent9c07b884b92c80e9d660b7b9282631fb626451e2 (diff)
[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')
-rw-r--r--drivers/net/gianfar_mii.c5
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)
128 struct gianfar_mdio_data *pdata; 128 struct gianfar_mdio_data *pdata;
129 struct gfar_mii *regs; 129 struct gfar_mii *regs;
130 struct mii_bus *new_bus; 130 struct mii_bus *new_bus;
131 struct resource *r;
131 int err = 0; 132 int err = 0;
132 133
133 if (NULL == dev) 134 if (NULL == dev)
@@ -151,8 +152,10 @@ int gfar_mdio_probe(struct device *dev)
151 return -ENODEV; 152 return -ENODEV;
152 } 153 }
153 154
155 r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
156
154 /* Set the PHY base address */ 157 /* Set the PHY base address */
155 regs = (struct gfar_mii *) ioremap(pdata->paddr, 158 regs = (struct gfar_mii *) ioremap(r->start,
156 sizeof (struct gfar_mii)); 159 sizeof (struct gfar_mii));
157 160
158 if (NULL == regs) { 161 if (NULL == regs) {