]> git.neil.brown.name Git - history.git/commitdiff
[SERIAL] Fix the calculation of the number of UARTs
authorRussell King <rmk@flint.arm.linux.org.uk>
Sun, 2 May 2004 21:47:52 +0000 (22:47 +0100)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sun, 2 May 2004 21:47:52 +0000 (22:47 +0100)
The calculation ended up believing we had one less UART than we
really had.  Fix it.

drivers/serial/8250_pci.c

index e321bc62f4801e83c35ad5c5bf18e2355a02a3e8..3d430adfe33a20f3fa20a62fde226d9cbcc8f03e 100644 (file)
@@ -525,7 +525,7 @@ pci_default_setup(struct pci_dev *dev, struct pci_board *board,
        else
                offset += idx * board->uart_offset;
 
-       maxnr = (pci_resource_len(dev, bar) - board->uart_offset) /
+       maxnr = (pci_resource_len(dev, bar) - board->first_offset) /
                (8 << board->reg_shift);
 
        if (board->flags & FL_REGION_SZ_CAP && idx >= maxnr)