Skip to content

Commit

Permalink
[PATCH] gianfar mii: Use proper resource for MII memory region
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kumar Gala authored and Jeff Garzik committed Jan 12, 2006
1 parent 9c07b88 commit 1d53267
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 4 additions & 1 deletion drivers/net/gianfar_mii.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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) {
Expand Down
3 changes: 0 additions & 3 deletions include/linux/fsl_devices.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ struct gianfar_platform_data {
};

struct gianfar_mdio_data {
/* device specific information */
u32 paddr;

/* board specific information */
int irq[32];
};
Expand Down

0 comments on commit 1d53267

Please sign in to comment.