summaryrefslogtreecommitdiff
path: root/drivers/net/ibm_newemac/mal.c
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2007-10-15 13:34:34 +0400
committerJeff Garzik <jeff@garzik.org>2007-10-15 22:29:49 +0400
commit792036952123a0670c7dd6960ca5458cdfd5e4fd (patch)
treea9a67cca154acddc467e504c796fa72390ba7cc6 /drivers/net/ibm_newemac/mal.c
parentbc2618f7528d4b6ea0c2c53539a3b8cff2b33b24 (diff)
downloadlinux-792036952123a0670c7dd6960ca5458cdfd5e4fd.tar.xz
Update ibm_newemac to use dcr_host_t.base
Now that dcr_host_t contains the base address, we can use that in the ibm_newemac code, rather than storing it separately. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/ibm_newemac/mal.c')
-rw-r--r--drivers/net/ibm_newemac/mal.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/ibm_newemac/mal.c b/drivers/net/ibm_newemac/mal.c
index 58854117b1a9..748a86969d73 100644
--- a/drivers/net/ibm_newemac/mal.c
+++ b/drivers/net/ibm_newemac/mal.c
@@ -461,6 +461,7 @@ static int __devinit mal_probe(struct of_device *ofdev,
struct mal_instance *mal;
int err = 0, i, bd_size;
int index = mal_count++;
+ unsigned int dcr_base;
const u32 *prop;
u32 cfg;
@@ -497,14 +498,14 @@ static int __devinit mal_probe(struct of_device *ofdev,
}
mal->num_rx_chans = prop[0];
- mal->dcr_base = dcr_resource_start(ofdev->node, 0);
- if (mal->dcr_base == 0) {
+ dcr_base = dcr_resource_start(ofdev->node, 0);
+ if (dcr_base == 0) {
printk(KERN_ERR
"mal%d: can't find DCR resource!\n", index);
err = -ENODEV;
goto fail;
}
- mal->dcr_host = dcr_map(ofdev->node, mal->dcr_base, 0x100);
+ mal->dcr_host = dcr_map(ofdev->node, dcr_base, 0x100);
if (!DCR_MAP_OK(mal->dcr_host)) {
printk(KERN_ERR
"mal%d: failed to map DCRs !\n", index);
@@ -626,7 +627,7 @@ static int __devinit mal_probe(struct of_device *ofdev,
fail2:
dma_free_coherent(&ofdev->dev, bd_size, mal->bd_virt, mal->bd_dma);
fail_unmap:
- dcr_unmap(mal->dcr_host, mal->dcr_base, 0x100);
+ dcr_unmap(mal->dcr_host, dcr_base, 0x100);
fail:
kfree(mal);