diff options
author | Marc Zyngier <maz@misterjones.org> | 2006-04-13 11:38:20 +0200 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-04-20 17:42:05 -0400 |
commit | 18e37f2a979dd696e6b4495b6f2470c01ffeab6c (patch) | |
tree | c1e5b5fe2db54c7596d8db10935ce8d2886a4db1 /drivers/net/cassini.c | |
parent | d5498bef6fcd8ca0e4579eeb0b0d724f20221bb1 (diff) | |
download | linux-rpi3-18e37f2a979dd696e6b4495b6f2470c01ffeab6c.tar.gz linux-rpi3-18e37f2a979dd696e6b4495b6f2470c01ffeab6c.tar.bz2 linux-rpi3-18e37f2a979dd696e6b4495b6f2470c01ffeab6c.zip |
[PATCH] netdrvr: Convert cassini to pci_iomap
Folks,
This patch (against 2.6.17-rc1) converts the cassini driver to the
pci_iomap API that will do the right thing, so architectures like
PARISC can stop screaming about illegal usage of ioremap() on
non-cacheable regions.
Tested on 64bit PARISC kernel.
Signed-off-by: Marc Zyngier <maz@misterjones.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/cassini.c')
-rw-r--r-- | drivers/net/cassini.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c index ac48f7543500..39f36aa05aa8 100644 --- a/drivers/net/cassini.c +++ b/drivers/net/cassini.c @@ -4877,7 +4877,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) { static int cas_version_printed = 0; - unsigned long casreg_base, casreg_len; + unsigned long casreg_len; struct net_device *dev; struct cas *cp; int i, err, pci_using_dac; @@ -4972,7 +4972,6 @@ static int __devinit cas_init_one(struct pci_dev *pdev, pci_using_dac = 0; } - casreg_base = pci_resource_start(pdev, 0); casreg_len = pci_resource_len(pdev, 0); cp = netdev_priv(dev); @@ -5024,7 +5023,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev, cp->timer_ticks = 0; /* give us access to cassini registers */ - cp->regs = ioremap(casreg_base, casreg_len); + cp->regs = pci_iomap(pdev, 0, casreg_len); if (cp->regs == 0UL) { printk(KERN_ERR PFX "Cannot map device registers, " "aborting.\n"); @@ -5123,7 +5122,7 @@ err_out_iounmap: cas_shutdown(cp); mutex_unlock(&cp->pm_mutex); - iounmap(cp->regs); + pci_iounmap(pdev, cp->regs); err_out_free_res: @@ -5171,7 +5170,7 @@ static void __devexit cas_remove_one(struct pci_dev *pdev) #endif pci_free_consistent(pdev, sizeof(struct cas_init_block), cp->init_block, cp->block_dvma); - iounmap(cp->regs); + pci_iounmap(pdev, cp->regs); free_netdev(dev); pci_release_regions(pdev); pci_disable_device(pdev); |