Commit 30ebc7ef authored by Ondrej Zary's avatar Ondrej Zary Committed by Martin K. Petersen

atp870u: Use n_io_port in request_region and release_region

Signed-off-by: default avatarOndrej Zary <linux@rainbow-software.org>
Reviewed-by: default avatarHannes Reinicke <hare@suse.de>
Acked-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 1ccd7d68
...@@ -1610,16 +1610,8 @@ static int atp870u_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -1610,16 +1610,8 @@ static int atp870u_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
shpnt->irq = pdev->irq; shpnt->irq = pdev->irq;
} }
spin_unlock_irqrestore(shpnt->host_lock, flags); spin_unlock_irqrestore(shpnt->host_lock, flags);
if(ent->device==ATP885_DEVID) { if (!request_region(base_io, shpnt->n_io_port, "atp870u"))
if(!request_region(base_io, 0xff, "atp870u")) /* Register the IO ports that we use */ goto request_io_fail;
goto request_io_fail;
} else if((ent->device==ATP880_DEVID1)||(ent->device==ATP880_DEVID2)) {
if(!request_region(base_io, 0x60, "atp870u")) /* Register the IO ports that we use */
goto request_io_fail;
} else {
if(!request_region(base_io, 0x40, "atp870u")) /* Register the IO ports that we use */
goto request_io_fail;
}
count++; count++;
if (scsi_add_host(shpnt, &pdev->dev)) if (scsi_add_host(shpnt, &pdev->dev))
goto scsi_add_fail; goto scsi_add_fail;
...@@ -1631,13 +1623,7 @@ static int atp870u_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -1631,13 +1623,7 @@ static int atp870u_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
scsi_add_fail: scsi_add_fail:
printk("atp870u_prob:scsi_add_fail\n"); printk("atp870u_prob:scsi_add_fail\n");
if(ent->device==ATP885_DEVID) { release_region(base_io, shpnt->n_io_port);
release_region(base_io, 0xff);
} else if((ent->device==ATP880_DEVID1)||(ent->device==ATP880_DEVID2)) {
release_region(base_io, 0x60);
} else {
release_region(base_io, 0x40);
}
request_io_fail: request_io_fail:
printk("atp870u_prob:request_io_fail\n"); printk("atp870u_prob:request_io_fail\n");
free_irq(pdev->irq, shpnt); free_irq(pdev->irq, shpnt);
......
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