Commit 7bc8d827 authored by Russell King's avatar Russell King Committed by Linus Torvalds

[SERIAL] Fix the calculation of the number of UARTs

The calculation ended up believing we had one less UART than we
really had.  Fix it.
parent 1230e437
...@@ -525,7 +525,7 @@ pci_default_setup(struct pci_dev *dev, struct pci_board *board, ...@@ -525,7 +525,7 @@ pci_default_setup(struct pci_dev *dev, struct pci_board *board,
else else
offset += idx * board->uart_offset; 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); (8 << board->reg_shift);
if (board->flags & FL_REGION_SZ_CAP && idx >= maxnr) if (board->flags & FL_REGION_SZ_CAP && idx >= maxnr)
......
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