int serial8250_find_port_for_earlycon(void) { struct early_serial8250_device *device = &early_device; struct uart_port *port = &device->port; int line; int ret; if (!device->port.membase && !device->port.iobase) return -ENODEV; line = serial8250_find_port(port); if (line < 0) return -ENODEV; ret = update_console_cmdline("uart", 8250, "ttyS", line, device->options); if (ret < 0) ret = update_console_cmdline("uart", 0, "ttyS", line, device->options); return ret; }
int serial8250_find_port_for_earlycon(void) { struct earlycon_device *device = early_device; struct uart_port *port = device ? &device->port : NULL; int line; int ret; if (!port || (!port->membase && !port->iobase)) return -ENODEV; line = serial8250_find_port(port); if (line < 0) return -ENODEV; ret = update_console_cmdline("uart", 8250, "ttyS", line, device->options); if (ret < 0) ret = update_console_cmdline("uart", 0, "ttyS", line, device->options); return ret; }