diff options
Diffstat (limited to 'drivers/tty/serial/8250/8250_pcilib.c')
| -rw-r--r-- | drivers/tty/serial/8250/8250_pcilib.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/tty/serial/8250/8250_pcilib.c b/drivers/tty/serial/8250/8250_pcilib.c index d8d0ae0d7238..9d5d2531a33b 100644 --- a/drivers/tty/serial/8250/8250_pcilib.c +++ b/drivers/tty/serial/8250/8250_pcilib.c @@ -22,19 +22,16 @@ int serial_8250_warn_need_ioport(struct pci_dev *dev) EXPORT_SYMBOL_NS_GPL(serial_8250_warn_need_ioport, "SERIAL_8250_PCI"); int serial8250_pci_setup_port(struct pci_dev *dev, struct uart_8250_port *port, - u8 bar, unsigned int offset, int regshift) + u8 bar, unsigned int offset, int regshift, void __iomem *iomem) { if (bar >= PCI_STD_NUM_BARS) return -EINVAL; if (pci_resource_flags(dev, bar) & IORESOURCE_MEM) { - if (!pcim_iomap(dev, bar, 0) && !pcim_iomap_table(dev)) - return -ENOMEM; - port->port.iotype = UPIO_MEM; port->port.iobase = 0; port->port.mapbase = pci_resource_start(dev, bar) + offset; - port->port.membase = pcim_iomap_table(dev)[bar] + offset; + port->port.membase = iomem + offset; port->port.regshift = regshift; } else if (IS_ENABLED(CONFIG_HAS_IOPORT)) { port->port.iotype = UPIO_PORT; |
