From: Peter Hurley <peter@hurleysoftware.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Andrew Morton <akpm@linux-foundation.org>
Cc: Jiri Slaby <jslaby@suse.cz>,
linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
Rob Herring <robh@kernel.org>,
Peter Hurley <peter@hurleysoftware.com>
Subject: [PATCH v2 -next 05/13] serial: 8250_early: Remove early_device variable
Date: Sun, 1 Mar 2015 11:05:50 -0500 [thread overview]
Message-ID: <1425225958-17908-6-git-send-email-peter@hurleysoftware.com> (raw)
In-Reply-To: <1425225958-17908-1-git-send-email-peter@hurleysoftware.com>
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()).
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
---
drivers/tty/serial/8250/8250_early.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/tty/serial/8250/8250_early.c b/drivers/tty/serial/8250/8250_early.c
index 49bca65..d7b831b 100644
--- a/drivers/tty/serial/8250/8250_early.c
+++ b/drivers/tty/serial/8250/8250_early.c
@@ -36,8 +36,6 @@
#include <asm/io.h>
#include <asm/serial.h>
-static struct earlycon_device *early_device;
-
unsigned int __weak __init serial8250_early_in(struct uart_port *port, int offset)
{
switch (port->iotype) {
@@ -90,7 +88,8 @@ static void __init serial_putc(struct uart_port *port, int c)
static void __init early_serial8250_write(struct console *console,
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;
/* Save the IER and disable interrupts preserving the UUE bit */
@@ -157,7 +156,6 @@ static int __init early_serial8250_setup(struct earlycon_device *device,
init_port(device);
- early_device = device;
device->con->write = early_serial8250_write;
return 0;
}
--
2.3.0
next prev parent reply other threads:[~2015-03-01 16:05 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-01 16:05 [PATCH v2 -next 00/13] Extensible console matching & direct earlycon Peter Hurley
2015-03-01 16:05 ` [PATCH v2 -next 01/13] serial: earlycon: Refactor parse_options into serial core Peter Hurley
2015-03-01 16:05 ` [PATCH v2 -next 02/13] console: Preserve index after console setup() Peter Hurley
2015-03-01 16:05 ` [PATCH v2 -next 03/13] console: Add extensible console matching Peter Hurley
2015-03-07 2:57 ` Greg Kroah-Hartman
2015-03-07 13:00 ` Peter Hurley
2015-03-01 16:05 ` [PATCH v2 -next 04/13] serial: core: Fix kernel doc for uart_console_write() Peter Hurley
2015-03-01 16:05 ` Peter Hurley [this message]
2015-03-01 16:05 ` [PATCH v2 -next 06/13] serial: earlycon: Move ->uartclk initialize Peter Hurley
2015-03-01 16:05 ` [PATCH v2 -next 07/13] serial: 8250_early: Assume uart already initialized if no baud option Peter Hurley
2015-03-01 16:05 ` [PATCH v2 -next 08/13] serial: 8250_early: Fix setup() error code Peter Hurley
2015-03-01 16:05 ` [PATCH v2 -next 09/13] serial: earlycon: Ignore parse_options() " Peter Hurley
2015-03-01 16:05 ` [PATCH v2 -next 10/13] serial: earlycon: Allow earlycon params with name only Peter Hurley
2015-03-05 15:46 ` Rob Herring
2015-03-05 15:53 ` Peter Hurley
2015-03-05 16:07 ` Peter Hurley
2015-03-01 16:05 ` [PATCH v2 -next 11/13] serial: earlycon: Refactor earlycon registration Peter Hurley
2015-03-01 16:05 ` [PATCH v2 -next 12/13] serial: earlycon: Enable earlycon without command line param Peter Hurley
2015-03-01 16:05 ` [PATCH v2 -next 13/13] serial: 8250_early: Remove setup_early_serial8250_console() Peter Hurley
2015-03-05 16:11 ` [PATCH v2 -next 00/13] Extensible console matching & direct earlycon Rob Herring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1425225958-17908-6-git-send-email-peter@hurleysoftware.com \
--to=peter@hurleysoftware.com \
--cc=akpm@linux-foundation.org \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).