Commit 05e70e85 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] qlogicisp iomem annotations

Signed-off-by: default avatarAl Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent d2466999
......@@ -564,7 +564,7 @@ struct isp_queue_entry {
};
struct isp1020_hostdata {
u_long memaddr;
void __iomem *memaddr;
u_char revision;
struct host_param host_param;
struct dev_param dev_param[MAX_TARGETS];
......@@ -714,7 +714,7 @@ int isp1020_detect(Scsi_Host_Template *tmpt)
continue;
fail_uninit:
iounmap((void *)hostdata->memaddr);
iounmap(hostdata->memaddr);
release_region(host->io_port, 0xff);
fail_and_unregister:
if (hostdata->res_cpu)
......@@ -747,7 +747,7 @@ int isp1020_release(struct Scsi_Host *host)
isp_outw(0x0, host, PCI_INTF_CTL);
free_irq(host->irq, host);
iounmap((void *)hostdata->memaddr);
iounmap(hostdata->memaddr);
release_region(host->io_port, 0xff);
......@@ -769,7 +769,7 @@ const char *isp1020_info(struct Scsi_Host *host)
"QLogic ISP1020 SCSI on PCI bus %02x device %02x irq %d %s base 0x%lx",
hostdata->pci_dev->bus->number, hostdata->pci_dev->devfn, host->irq,
(hostdata->memaddr ? "MEM" : "I/O"),
(hostdata->memaddr ? hostdata->memaddr : host->io_port));
(hostdata->memaddr ? (unsigned long)hostdata->memaddr : host->io_port));
LEAVE("isp1020_info");
......@@ -1410,18 +1410,17 @@ static int isp1020_init(struct Scsi_Host *sh)
if ((command & PCI_COMMAND_MEMORY) &&
((mem_flags & 1) == 0)) {
mem_base = (u_long) ioremap(mem_base, PAGE_SIZE);
if (!mem_base) {
hostdata->memaddr = ioremap(mem_base, PAGE_SIZE);
if (!hostdata->memaddr) {
printk("qlogicisp : i/o remapping failed.\n");
goto out_release;
}
hostdata->memaddr = mem_base;
} else {
if (command & PCI_COMMAND_IO && (io_flags & 3) != 1) {
printk("qlogicisp : i/o mapping is disabled\n");
goto out_release;
}
hostdata->memaddr = 0; /* zero to signify no i/o mapping */
hostdata->memaddr = NULL; /* zero to signify no i/o mapping */
mem_base = 0;
}
......@@ -1470,7 +1469,7 @@ static int isp1020_init(struct Scsi_Host *sh)
return 0;
out_unmap:
iounmap((void *)hostdata->memaddr);
iounmap(hostdata->memaddr);
out_release:
release_region(sh->io_port, 0xff);
return 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment