diff options
author | Marc Zyngier <maz@misterjones.org> | 2006-04-13 05:38:20 -0400 |
---|---|---|
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) |
[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, | |||
4877 | const struct pci_device_id *ent) | 4877 | const struct pci_device_id *ent) |
4878 | { | 4878 | { |
4879 | static int cas_version_printed = 0; | 4879 | static int cas_version_printed = 0; |
4880 | unsigned long casreg_base, casreg_len; | 4880 | unsigned long casreg_len; |
4881 | struct net_device *dev; | 4881 | struct net_device *dev; |
4882 | struct cas *cp; | 4882 | struct cas *cp; |
4883 | int i, err, pci_using_dac; | 4883 | int i, err, pci_using_dac; |
@@ -4972,7 +4972,6 @@ static int __devinit cas_init_one(struct pci_dev *pdev, | |||
4972 | pci_using_dac = 0; | 4972 | pci_using_dac = 0; |
4973 | } | 4973 | } |
4974 | 4974 | ||
4975 | casreg_base = pci_resource_start(pdev, 0); | ||
4976 | casreg_len = pci_resource_len(pdev, 0); | 4975 | casreg_len = pci_resource_len(pdev, 0); |
4977 | 4976 | ||
4978 | cp = netdev_priv(dev); | 4977 | cp = netdev_priv(dev); |
@@ -5024,7 +5023,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev, | |||
5024 | cp->timer_ticks = 0; | 5023 | cp->timer_ticks = 0; |
5025 | 5024 | ||
5026 | /* give us access to cassini registers */ | 5025 | /* give us access to cassini registers */ |
5027 | cp->regs = ioremap(casreg_base, casreg_len); | 5026 | cp->regs = pci_iomap(pdev, 0, casreg_len); |
5028 | if (cp->regs == 0UL) { | 5027 | if (cp->regs == 0UL) { |
5029 | printk(KERN_ERR PFX "Cannot map device registers, " | 5028 | printk(KERN_ERR PFX "Cannot map device registers, " |
5030 | "aborting.\n"); | 5029 | "aborting.\n"); |
@@ -5123,7 +5122,7 @@ err_out_iounmap: | |||
5123 | cas_shutdown(cp); | 5122 | cas_shutdown(cp); |
5124 | mutex_unlock(&cp->pm_mutex); | 5123 | mutex_unlock(&cp->pm_mutex); |
5125 | 5124 | ||
5126 | iounmap(cp->regs); | 5125 | pci_iounmap(pdev, cp->regs); |
5127 | 5126 | ||
5128 | 5127 | ||
5129 | err_out_free_res: | 5128 | err_out_free_res: |
@@ -5171,7 +5170,7 @@ static void __devexit cas_remove_one(struct pci_dev *pdev) | |||
5171 | #endif | 5170 | #endif |
5172 | pci_free_consistent(pdev, sizeof(struct cas_init_block), | 5171 | pci_free_consistent(pdev, sizeof(struct cas_init_block), |
5173 | cp->init_block, cp->block_dvma); | 5172 | cp->init_block, cp->block_dvma); |
5174 | iounmap(cp->regs); | 5173 | pci_iounmap(pdev, cp->regs); |
5175 | free_netdev(dev); | 5174 | free_netdev(dev); |
5176 | pci_release_regions(pdev); | 5175 | pci_release_regions(pdev); |
5177 | pci_disable_device(pdev); | 5176 | pci_disable_device(pdev); |