Commit d0d654ce authored by Peter Hurley's avatar Peter Hurley Committed by Greg Kroah-Hartman

serial: 8250_early: Remove early_device variable

early_device was only required for serial8250_find_port_for_earlycon(),
which was replaced by extensible console matching.

Fixup early_serial8250_write() to get the earlycon_device * from
console->data (which is initialized by {of_}setup_earlycon()).
Acked-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarPeter Hurley <peter@hurleysoftware.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1cfe42b7
...@@ -36,8 +36,6 @@ ...@@ -36,8 +36,6 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/serial.h> #include <asm/serial.h>
static struct earlycon_device *early_device;
unsigned int __weak __init serial8250_early_in(struct uart_port *port, int offset) unsigned int __weak __init serial8250_early_in(struct uart_port *port, int offset)
{ {
switch (port->iotype) { switch (port->iotype) {
...@@ -90,7 +88,8 @@ static void __init serial_putc(struct uart_port *port, int c) ...@@ -90,7 +88,8 @@ static void __init serial_putc(struct uart_port *port, int c)
static void __init early_serial8250_write(struct console *console, static void __init early_serial8250_write(struct console *console,
const char *s, unsigned int count) const char *s, unsigned int count)
{ {
struct uart_port *port = &early_device->port; struct earlycon_device *device = console->data;
struct uart_port *port = &device->port;
unsigned int ier; unsigned int ier;
/* Save the IER and disable interrupts preserving the UUE bit */ /* Save the IER and disable interrupts preserving the UUE bit */
...@@ -157,7 +156,6 @@ static int __init early_serial8250_setup(struct earlycon_device *device, ...@@ -157,7 +156,6 @@ static int __init early_serial8250_setup(struct earlycon_device *device,
init_port(device); init_port(device);
early_device = device;
device->con->write = early_serial8250_write; device->con->write = early_serial8250_write;
return 0; return 0;
} }
......
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