summaryrefslogtreecommitdiff
path: root/drivers/scsi/bfa/bfad.c
diff options
context:
space:
mode:
authorJing Huang <huangj@brocade.com>2010-03-19 11:06:44 -0700
committerJames Bottomley <James.Bottomley@suse.de>2010-04-11 09:24:19 -0500
commitb3522f08ec7011aed0abc477bfedd00d189e9cd6 (patch)
tree369e355b051628a316724686fa07c822676163af /drivers/scsi/bfa/bfad.c
parent2eba0d4c000777ce43012d7fda806b075f6cf877 (diff)
downloadlinux-3.10-b3522f08ec7011aed0abc477bfedd00d189e9cd6.tar.gz
linux-3.10-b3522f08ec7011aed0abc477bfedd00d189e9cd6.tar.bz2
linux-3.10-b3522f08ec7011aed0abc477bfedd00d189e9cd6.zip
[SCSI] bfa: use pci_iomap() and pci_iounmap()
Use pci_iomap() and pci_iounmap() to simplify the code. Remove uncessary #ifdef check for ia64 (it was added as a workaound for some RHEL 5.x release which doesn't export iounmap function) Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/bfa/bfad.c')
-rw-r--r--drivers/scsi/bfa/bfad.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/scsi/bfa/bfad.c b/drivers/scsi/bfa/bfad.c
index 3a5163d3675..0baeabadb5b 100644
--- a/drivers/scsi/bfa/bfad.c
+++ b/drivers/scsi/bfa/bfad.c
@@ -590,7 +590,6 @@ bfad_init_timer(struct bfad_s *bfad)
int
bfad_pci_init(struct pci_dev *pdev, struct bfad_s *bfad)
{
- unsigned long bar0_len;
int rc = -ENODEV;
if (pci_enable_device(pdev)) {
@@ -610,9 +609,7 @@ bfad_pci_init(struct pci_dev *pdev, struct bfad_s *bfad)
goto out_release_region;
}
- bfad->pci_bar0_map = pci_resource_start(pdev, 0);
- bar0_len = pci_resource_len(pdev, 0);
- bfad->pci_bar0_kva = ioremap(bfad->pci_bar0_map, bar0_len);
+ bfad->pci_bar0_kva = pci_iomap(pdev, 0, pci_resource_len(pdev, 0));
if (bfad->pci_bar0_kva == NULL) {
BFA_PRINTF(BFA_ERR, "Fail to map bar0\n");
@@ -645,11 +642,7 @@ out:
void
bfad_pci_uninit(struct pci_dev *pdev, struct bfad_s *bfad)
{
-#if defined(__ia64__)
pci_iounmap(pdev, bfad->pci_bar0_kva);
-#else
- iounmap(bfad->pci_bar0_kva);
-#endif
pci_release_regions(pdev);
pci_disable_device(pdev);
pci_set_drvdata(pdev, NULL);