aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2015-03-09 16:27:14 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-26 11:16:20 -0400
commitd0d654ce53ab34f9306630ebcbfc477a994ea662 (patch)
tree36776a399a5ae0a24e2b4c6c828ba723f7a1f148
parent1cfe42b7fd299723b521b5b4bd8019a611366c5e (diff)
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: Rob Herring <robh@kernel.org> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/tty/serial/8250/8250_early.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/tty/serial/8250/8250_early.c b/drivers/tty/serial/8250/8250_early.c
index 49bca65057e6..d7b831bcf367 100644
--- a/drivers/tty/serial/8250/8250_early.c
+++ b/drivers/tty/serial/8250/8250_early.c
@@ -36,8 +36,6 @@
36#include <asm/io.h> 36#include <asm/io.h>
37#include <asm/serial.h> 37#include <asm/serial.h>
38 38
39static struct earlycon_device *early_device;
40
41unsigned int __weak __init serial8250_early_in(struct uart_port *port, int offset) 39unsigned int __weak __init serial8250_early_in(struct uart_port *port, int offset)
42{ 40{
43 switch (port->iotype) { 41 switch (port->iotype) {
@@ -90,7 +88,8 @@ static void __init serial_putc(struct uart_port *port, int c)
90static void __init early_serial8250_write(struct console *console, 88static void __init early_serial8250_write(struct console *console,
91 const char *s, unsigned int count) 89 const char *s, unsigned int count)
92{ 90{
93 struct uart_port *port = &early_device->port; 91 struct earlycon_device *device = console->data;
92 struct uart_port *port = &device->port;
94 unsigned int ier; 93 unsigned int ier;
95 94
96 /* Save the IER and disable interrupts preserving the UUE bit */ 95 /* 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 156
158 init_port(device); 157 init_port(device);
159 158
160 early_device = device;
161 device->con->write = early_serial8250_write; 159 device->con->write = early_serial8250_write;
162 return 0; 160 return 0;
163} 161}