Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933023AbcCRPao (ORCPT ); Fri, 18 Mar 2016 11:30:44 -0400 Received: from mail-pf0-f180.google.com ([209.85.192.180]:33107 "EHLO mail-pf0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932839AbcCRPaj (ORCPT ); Fri, 18 Mar 2016 11:30:39 -0400 Subject: Re: [PATCH v2] serial: 8250_ingenic: Remove global variable To: Paul Cercueil References: <1457781733-2643-1-git-send-email-paul@crapouillou.net> Cc: Greg Kroah-Hartman , Jiri Slaby , Matt Redfearn , Paul Burton , Krzysztof Kozlowski , Masahiro Yamada , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org From: Peter Hurley Message-ID: <56EC1F1C.2070402@hurleysoftware.com> Date: Fri, 18 Mar 2016 08:30:36 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <1457781733-2643-1-git-send-email-paul@crapouillou.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1618 Lines: 51 Hi Paul, On 03/12/2016 03:22 AM, Paul Cercueil wrote: Changelog? > Signed-off-by: Paul Cercueil > --- > 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; >