[PATCH] dc395x [6/6] - use pci resource len

Jamie Lenehan
2003-08-21T10:17:59Z

Instead of hard coding the number of io ports (to the wrong value no
less) use the pci_resource_length to determine the number.

diff -du -r a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c
--- a/drivers/scsi/dc395x.c 2003-08-20 21:39:11.817249304 +1000
+++ b/drivers/scsi/dc395x.c 2003-08-20 21:39:19.213124960 +1000
@@ -5843,7 +5843,7 @@
return -ENODEV;
}
io_port_base = pci_resource_start(dev, 0) & PCI_BASE_ADDRESS_IO_MASK;
- io_port_len = 0x80; /* XXX: use pci_resource_len? */
+ io_port_len = pci_resource_len(dev, 0);
irq = dev->irq;
dprintkdbg(DBG_0, "IO_PORT=%04x, IRQ=%x\n", io_port_base, dev->irq);