diff options
author | Lennart Sorensen <lsorense@csclub.uwaterloo.ca> | 2011-06-01 14:38:41 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-06-07 12:25:34 -0400 |
commit | af99d6f0037d970084b03d9690f50e34d6f70dae (patch) | |
tree | 4f2480b9be4f29e55f62c6d343c905dea5dc643a /drivers/tty/serial/jsm/jsm_driver.c | |
parent | 163baa33552bb1c08b6bf109319505570658a8f3 (diff) |
serial: ioremap warning fix for jsm driver.
I saw a warning about ioremap from the jsm driver on a system which
looked like this:
resource map sanity check conflict: 0xe0200800 0xe02017ff 0xe0200800 0xe0200fff 0000:01:08.0
Turns out the warning is valid. The jsm driver has been asking to ioremap
0x1000 forever, but in fact only 8 port chips have 0x1000 bytes of memory.
4 port chips have 0x800 and 2 port chips have 0x400 according to the
data sheet. It makes more sense to map the size of the region rather
than a hard coded value. If you happen to have the region legitimately
mapped to a base address that is not 4K aligned, ioremap complains
otherwise.
Signed-off-by: Len Sorensen <lsorense@csclub.uwaterloo.ca>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/tty/serial/jsm/jsm_driver.c')
-rw-r--r-- | drivers/tty/serial/jsm/jsm_driver.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/jsm/jsm_driver.c b/drivers/tty/serial/jsm/jsm_driver.c index 18f548449c63..96da17868cf3 100644 --- a/drivers/tty/serial/jsm/jsm_driver.c +++ b/drivers/tty/serial/jsm/jsm_driver.c | |||
@@ -125,7 +125,7 @@ static int __devinit jsm_probe_one(struct pci_dev *pdev, const struct pci_device | |||
125 | brd->bd_uart_offset = 0x200; | 125 | brd->bd_uart_offset = 0x200; |
126 | brd->bd_dividend = 921600; | 126 | brd->bd_dividend = 921600; |
127 | 127 | ||
128 | brd->re_map_membase = ioremap(brd->membase, 0x1000); | 128 | brd->re_map_membase = ioremap(brd->membase, pci_resource_len(pdev, 0)); |
129 | if (!brd->re_map_membase) { | 129 | if (!brd->re_map_membase) { |
130 | dev_err(&pdev->dev, | 130 | dev_err(&pdev->dev, |
131 | "card has no PCI Memory resources, " | 131 | "card has no PCI Memory resources, " |