linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] serial: 8250_ingenic: Remove global variable
@ 2016-03-12 11:22 Paul Cercueil
  2016-03-18 15:30 ` Peter Hurley
  2016-04-19  6:29 ` Greg Kroah-Hartman
  0 siblings, 2 replies; 3+ messages in thread
From: Paul Cercueil @ 2016-03-12 11:22 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, Matt Redfearn, Paul Burton, Krzysztof Kozlowski,
	Peter Hurley, Paul Cercueil, Masahiro Yamada, linux-serial,
	linux-kernel

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
 v2: Added changelog; nothing else changed
 v1: First version of this patch
 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] serial: 8250_ingenic: Remove global variable
  2016-03-12 11:22 [PATCH v2] serial: 8250_ingenic: Remove global variable Paul Cercueil
@ 2016-03-18 15:30 ` Peter Hurley
  2016-04-19  6:29 ` Greg Kroah-Hartman
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Hurley @ 2016-03-18 15:30 UTC (permalink / raw)
  To: Paul Cercueil
  Cc: Greg Kroah-Hartman, Jiri Slaby, Matt Redfearn, Paul Burton,
	Krzysztof Kozlowski, Masahiro Yamada, linux-serial, linux-kernel

Hi Paul,

On 03/12/2016 03:22 AM, Paul Cercueil wrote:

Changelog?

> Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> ---
>  v2: Added changelog; nothing else changed
>  v1: First version of this patch
>  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->data is already initialized.

Regards,
Peter Hurley

>  	dev->con->write = ingenic_early_console_write;
>  
>  	return 0;
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] serial: 8250_ingenic: Remove global variable
  2016-03-12 11:22 [PATCH v2] serial: 8250_ingenic: Remove global variable Paul Cercueil
  2016-03-18 15:30 ` Peter Hurley
@ 2016-04-19  6:29 ` Greg Kroah-Hartman
  1 sibling, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2016-04-19  6:29 UTC (permalink / raw)
  To: Paul Cercueil
  Cc: Jiri Slaby, Matt Redfearn, Paul Burton, Krzysztof Kozlowski,
	Peter Hurley, Masahiro Yamada, linux-serial, linux-kernel

On Sat, Mar 12, 2016 at 12:22:13PM +0100, Paul Cercueil wrote:
> Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> ---
>  v2: Added changelog; nothing else changed

I can't take patches without a changelog at all, sorry.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-04-19  6:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-12 11:22 [PATCH v2] serial: 8250_ingenic: Remove global variable Paul Cercueil
2016-03-18 15:30 ` Peter Hurley
2016-04-19  6:29 ` Greg Kroah-Hartman

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).