Commit 75c43071 authored by Jamie Lenehan's avatar Jamie Lenehan Committed by Christoph Hellwig

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

Instead of hard coding the number of io ports (to the wrong value no
less) use the pci_resource_length to determine the number.
parent e355f8bc
......@@ -5843,7 +5843,7 @@ int __devinit dc395x_init_one(struct pci_dev *dev,
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);
......
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