diff options
author | Arjan van de Ven <arjan@linux.intel.com> | 2008-09-28 19:18:02 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-12-29 12:24:11 -0500 |
commit | 25729a7fb88ef2912fcb869abe3a76b3be07fc06 (patch) | |
tree | 146e6282ac25d0e00987891a73c02f1682e39b7c /drivers/scsi/arcmsr | |
parent | decf67e31e855963f4616912d9bc5b1c339d810a (diff) |
[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')
-rw-r--r-- | drivers/scsi/arcmsr/arcmsr_hba.c | 8 |
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) | |||
235 | uint32_t intmask_org; | 235 | uint32_t intmask_org; |
236 | int i, j; | 236 | int i, j; |
237 | 237 | ||
238 | acb->pmuA = ioremap(pci_resource_start(pdev, 0), pci_resource_len(pdev, 0)); | 238 | acb->pmuA = pci_ioremap_bar(pdev, 0); |
239 | if (!acb->pmuA) { | 239 | if (!acb->pmuA) { |
240 | printk(KERN_NOTICE "arcmsr%d: memory mapping region fail \n", | 240 | printk(KERN_NOTICE "arcmsr%d: memory mapping region fail \n", |
241 | acb->host->host_no); | 241 | acb->host->host_no); |
@@ -329,13 +329,11 @@ static int arcmsr_alloc_ccb_pool(struct AdapterControlBlock *acb) | |||
329 | reg = (struct MessageUnit_B *)(dma_coherent + | 329 | reg = (struct MessageUnit_B *)(dma_coherent + |
330 | ARCMSR_MAX_FREECCB_NUM * sizeof(struct CommandControlBlock)); | 330 | ARCMSR_MAX_FREECCB_NUM * sizeof(struct CommandControlBlock)); |
331 | acb->pmuB = reg; | 331 | acb->pmuB = reg; |
332 | mem_base0 = ioremap(pci_resource_start(pdev, 0), | 332 | mem_base0 = pci_ioremap_bar(pdev, 0); |
333 | pci_resource_len(pdev, 0)); | ||
334 | if (!mem_base0) | 333 | if (!mem_base0) |
335 | goto out; | 334 | goto out; |
336 | 335 | ||
337 | mem_base1 = ioremap(pci_resource_start(pdev, 2), | 336 | mem_base1 = pci_ioremap_bar(pdev, 2); |
338 | pci_resource_len(pdev, 2)); | ||
339 | if (!mem_base1) { | 337 | if (!mem_base1) { |
340 | iounmap(mem_base0); | 338 | iounmap(mem_base0); |
341 | goto out; | 339 | goto out; |