All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Thompson <daniel.thompson@linaro.org>
To: Tobias Klauser <tklauser@distanz.ch>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.cz>,
	linux-serial@vger.kernel.org, nios2-dev@lists.rocketboards.org
Subject: Re: [PATCH] serial: altera_jtaguart: Adpot uart_console_write()
Date: Tue, 15 Jul 2014 16:52:45 +0100	[thread overview]
Message-ID: <53C54E4D.70904@linaro.org> (raw)
In-Reply-To: <1405438008-27020-1-git-send-email-tklauser@distanz.ch>

On 15/07/14 16:26, Tobias Klauser wrote:
> Follow commit 2970b7f5ea3c ("serial: altera: Adopt
> uart_console_write()") and don't open code the LF to LFCR conversion in
> altera_jtaguart either. Use uart_console_write() instead.

Cool. I just wish I'd remembered to check the other altera drivers myself.

Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>


> Cc: Daniel Thompson <daniel.thompson@linaro.org>
> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
> ---
>  drivers/tty/serial/altera_jtaguart.c | 12 +++++-------
>  1 file changed, 5 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/tty/serial/altera_jtaguart.c b/drivers/tty/serial/altera_jtaguart.c
> index e7d1aaf..afe2e75 100644
> --- a/drivers/tty/serial/altera_jtaguart.c
> +++ b/drivers/tty/serial/altera_jtaguart.c
> @@ -304,7 +304,7 @@ static struct altera_jtaguart altera_jtaguart_ports[ALTERA_JTAGUART_MAXPORTS];
>  #if defined(CONFIG_SERIAL_ALTERA_JTAGUART_CONSOLE)
>  
>  #if defined(CONFIG_SERIAL_ALTERA_JTAGUART_CONSOLE_BYPASS)
> -static void altera_jtaguart_console_putc(struct console *co, const char c)
> +static void altera_jtaguart_console_putc(struct console *co, int c)
>  {
>  	struct uart_port *port = &(altera_jtaguart_ports + co->index)->port;
>  	unsigned long status;
> @@ -325,7 +325,7 @@ static void altera_jtaguart_console_putc(struct console *co, const char c)
>  	spin_unlock_irqrestore(&port->lock, flags);
>  }
>  #else
> -static void altera_jtaguart_console_putc(struct console *co, const char c)
> +static void altera_jtaguart_console_putc(struct console *co, int c)
>  {
>  	struct uart_port *port = &(altera_jtaguart_ports + co->index)->port;
>  	unsigned long flags;
> @@ -345,11 +345,9 @@ static void altera_jtaguart_console_putc(struct console *co, const char c)
>  static void altera_jtaguart_console_write(struct console *co, const char *s,
>  					  unsigned int count)
>  {
> -	for (; count; count--, s++) {
> -		altera_jtaguart_console_putc(co, *s);
> -		if (*s == '\n')
> -			altera_jtaguart_console_putc(co, '\r');
> -	}
> +	struct uart_port *port = &(altera_jtaguart_ports + co->index)->port;
> +
> +	uart_console_write(port, s, count, altera_jtaguart_console_putc);
>  }
>  
>  static int __init altera_jtaguart_console_setup(struct console *co,
> 


      reply	other threads:[~2014-07-15 15:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-15 15:26 [PATCH] serial: altera_jtaguart: Adpot uart_console_write() Tobias Klauser
2014-07-15 15:52 ` Daniel Thompson [this message]

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=53C54E4D.70904@linaro.org \
    --to=daniel.thompson@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.cz \
    --cc=linux-serial@vger.kernel.org \
    --cc=nios2-dev@lists.rocketboards.org \
    --cc=tklauser@distanz.ch \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.