diff options
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) | |||
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) { |