mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Cercueil <paul@crapouillou.net>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.com>,
	Matt Redfearn <matt.redfearn@imgtec.com>,
	Paul Burton <paul.burton@imgtec.com>,
	Krzysztof Kozlowski <k.kozlowski@samsung.com>,
	Peter Hurley <peter@hurleysoftware.com>,
	Paul Cercueil <paul@crapouillou.net>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] serial: 8250_ingenic: Remove global variable
Date: Sun,  6 Mar 2016 00:55:55 +0100	[thread overview]
Message-ID: <1457222155-27601-1-git-send-email-paul@crapouillou.net> (raw)

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
 drivers/tty/serial/8250/8250_ingenic.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_ingenic.c b/drivers/tty/serial/8250/8250_ingenic.c
index 155b785..aa1f156 100644
--- a/drivers/tty/serial/8250/8250_ingenic.c
+++ b/drivers/tty/serial/8250/8250_ingenic.c
@@ -49,8 +49,6 @@ static const struct of_device_id of_match[];
 #define UART_MCR_FCM	BIT(6)
 
 #ifdef CONFIG_SERIAL_EARLYCON
-static struct earlycon_device *early_device;
-
 static uint8_t __init early_in(struct uart_port *port, int offset)
 {
 	return readl(port->membase + (offset << 2));
@@ -75,6 +73,8 @@ static void __init ingenic_early_console_putc(struct uart_port *port, int c)
 static void __init ingenic_early_console_write(struct console *console,
 					      const char *s, unsigned int count)
 {
+	struct earlycon_device *early_device = console->data;
+
 	uart_console_write(&early_device->port, s, count,
 			   ingenic_early_console_putc);
 }
@@ -124,7 +124,7 @@ static int __init ingenic_early_console_setup(struct earlycon_device *dev,
 	early_out(port, UART_DLM, (divisor >> 8) & 0xff);
 	early_out(port, UART_LCR, UART_LCR_WLEN8);
 
-	early_device = dev;
+	dev->con->data = dev;
 	dev->con->write = ingenic_early_console_write;
 
 	return 0;
-- 
2.7.0

             reply	other threads:[~2016-03-05 23:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-05 23:55 Paul Cercueil [this message]
2016-03-06  3:01 ` Greg Kroah-Hartman

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=1457222155-27601-1-git-send-email-paul@crapouillou.net \
    --to=paul@crapouillou.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=k.kozlowski@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=matt.redfearn@imgtec.com \
    --cc=paul.burton@imgtec.com \
    --cc=peter@hurleysoftware.com \
    --cc=yamada.masahiro@socionext.com \
    /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

all inboxes | Powered by JetHome®