summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/arcmsr/arcmsr_hba.c
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2008-09-28 16:18:02 -0700
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-12-29 11:24:11 -0600
commit25729a7fb88ef2912fcb869abe3a76b3be07fc06 (patch)
tree146e6282ac25d0e00987891a73c02f1682e39b7c /drivers/scsi/arcmsr/arcmsr_hba.c
parentdecf67e31e855963f4616912d9bc5b1c339d810a (diff)
downloadlinux-25729a7fb88ef2912fcb869abe3a76b3be07fc06.tar.gz
linux-25729a7fb88ef2912fcb869abe3a76b3be07fc06.tar.bz2
linux-25729a7fb88ef2912fcb869abe3a76b3be07fc06.zip
[SCSI] advansys, arcmsr, ipr, nsp32, qla1280, stex: use pci_ioremap_bar()
Use the newly introduced pci_ioremap_bar() function in drivers/scsi. pci_ioremap_bar() just takes a pci device and a bar number, with the goal of making it really hard to get wrong, while also having a central place to stick sanity checks. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Acked-by: Matthew Wilcox <willy@linux.intel.com> Cc: Brian King <brking@us.ibm.com> Cc: Ed Lin <ed.lin@promise.com> Cc: Nick Cheng <nick.cheng@areca.com.tw> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/arcmsr/arcmsr_hba.c')
-rw-r--r--drivers/scsi/arcmsr/arcmsr_hba.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c
index f91f79c8007d..106c04d2d793 100644
--- a/drivers/scsi/arcmsr/arcmsr_hba.c
+++ b/drivers/scsi/arcmsr/arcmsr_hba.c
@@ -235,7 +235,7 @@ static int arcmsr_alloc_ccb_pool(struct AdapterControlBlock *acb)
uint32_t intmask_org;
int i, j;
- acb->pmuA = ioremap(pci_resource_start(pdev, 0), pci_resource_len(pdev, 0));
+ acb->pmuA = pci_ioremap_bar(pdev, 0);
if (!acb->pmuA) {
printk(KERN_NOTICE "arcmsr%d: memory mapping region fail \n",
acb->host->host_no);
@@ -329,13 +329,11 @@ static int arcmsr_alloc_ccb_pool(struct AdapterControlBlock *acb)
reg = (struct MessageUnit_B *)(dma_coherent +
ARCMSR_MAX_FREECCB_NUM * sizeof(struct CommandControlBlock));
acb->pmuB = reg;
- mem_base0 = ioremap(pci_resource_start(pdev, 0),
- pci_resource_len(pdev, 0));
+ mem_base0 = pci_ioremap_bar(pdev, 0);
if (!mem_base0)
goto out;
- mem_base1 = ioremap(pci_resource_start(pdev, 2),
- pci_resource_len(pdev, 2));
+ mem_base1 = pci_ioremap_bar(pdev, 2);
if (!mem_base1) {
iounmap(mem_base0);
goto out;