linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] serial: bcm63xx_uart: fix compilation after "TTY: switch tty_insert_flip_char"
@ 2013-02-24 13:08 Jonas Gorski
  2013-02-28 19:53 ` Jiri Slaby
  0 siblings, 1 reply; 2+ messages in thread
From: Jonas Gorski @ 2013-02-24 13:08 UTC (permalink / raw)
  To: linux-serial
  Cc: Greg Kroah-Hartman, Jiri Slaby, Maxime Bizon, Florian Fainelli,
	Kevin Cernekee

92a19f9cec9a80ad93c06e115822deb729e2c6ad introduced a local variable
with the same name as the argument to bcm_uart_do_rx, breaking
compilation. Fix this by renaming the new variable and its uses where
expected.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>
---
Based on git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git

 drivers/tty/serial/bcm63xx_uart.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/tty/serial/bcm63xx_uart.c b/drivers/tty/serial/bcm63xx_uart.c
index 719594e..52a3ecd 100644
--- a/drivers/tty/serial/bcm63xx_uart.c
+++ b/drivers/tty/serial/bcm63xx_uart.c
@@ -235,7 +235,7 @@ static const char *bcm_uart_type(struct uart_port *port)
  */
 static void bcm_uart_do_rx(struct uart_port *port)
 {
-	struct tty_port *port = &port->state->port;
+	struct tty_port *tty_port = &port->state->port;
 	unsigned int max_count;
 
 	/* limit number of char read in interrupt, should not be
@@ -260,7 +260,7 @@ static void bcm_uart_do_rx(struct uart_port *port)
 			bcm_uart_writel(port, val, UART_CTL_REG);
 
 			port->icount.overrun++;
-			tty_insert_flip_char(port, 0, TTY_OVERRUN);
+			tty_insert_flip_char(tty_port, 0, TTY_OVERRUN);
 		}
 
 		if (!(iestat & UART_IR_STAT(UART_IR_RXNOTEMPTY)))
@@ -299,11 +299,11 @@ static void bcm_uart_do_rx(struct uart_port *port)
 
 
 		if ((cstat & port->ignore_status_mask) == 0)
-			tty_insert_flip_char(port, c, flag);
+			tty_insert_flip_char(tty_port, c, flag);
 
 	} while (--max_count);
 
-	tty_flip_buffer_push(port);
+	tty_flip_buffer_push(tty_port);
 }
 
 /*
-- 
1.7.10.4


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

* Re: [PATCH] serial: bcm63xx_uart: fix compilation after "TTY: switch tty_insert_flip_char"
  2013-02-24 13:08 [PATCH] serial: bcm63xx_uart: fix compilation after "TTY: switch tty_insert_flip_char" Jonas Gorski
@ 2013-02-28 19:53 ` Jiri Slaby
  0 siblings, 0 replies; 2+ messages in thread
From: Jiri Slaby @ 2013-02-28 19:53 UTC (permalink / raw)
  To: Jonas Gorski, linux-serial
  Cc: Greg Kroah-Hartman, Maxime Bizon, Florian Fainelli,
	Kevin Cernekee

On 02/24/2013 02:08 PM, Jonas Gorski wrote:
> 92a19f9cec9a80ad93c06e115822deb729e2c6ad introduced a local variable
> with the same name as the argument to bcm_uart_do_rx, breaking
> compilation. Fix this by renaming the new variable and its uses where
> expected.
> 
> Signed-off-by: Jonas Gorski <jogo@openwrt.org>

Ok, I missed that one. Added this to my tty-build script now:
make O=../a/cross/mips-bcm63xx/ ARCH=mips CROSS_COMPILE=mips-linux- -j5
drivers/tty/serial/bcm63xx_uart.o

Thanks for fixing.

> ---
> Based on git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git
> 
>  drivers/tty/serial/bcm63xx_uart.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/tty/serial/bcm63xx_uart.c b/drivers/tty/serial/bcm63xx_uart.c
> index 719594e..52a3ecd 100644
> --- a/drivers/tty/serial/bcm63xx_uart.c
> +++ b/drivers/tty/serial/bcm63xx_uart.c
> @@ -235,7 +235,7 @@ static const char *bcm_uart_type(struct uart_port *port)
>   */
>  static void bcm_uart_do_rx(struct uart_port *port)
>  {
> -	struct tty_port *port = &port->state->port;
> +	struct tty_port *tty_port = &port->state->port;
>  	unsigned int max_count;
>  
>  	/* limit number of char read in interrupt, should not be
> @@ -260,7 +260,7 @@ static void bcm_uart_do_rx(struct uart_port *port)
>  			bcm_uart_writel(port, val, UART_CTL_REG);
>  
>  			port->icount.overrun++;
> -			tty_insert_flip_char(port, 0, TTY_OVERRUN);
> +			tty_insert_flip_char(tty_port, 0, TTY_OVERRUN);
>  		}
>  
>  		if (!(iestat & UART_IR_STAT(UART_IR_RXNOTEMPTY)))
> @@ -299,11 +299,11 @@ static void bcm_uart_do_rx(struct uart_port *port)
>  
>  
>  		if ((cstat & port->ignore_status_mask) == 0)
> -			tty_insert_flip_char(port, c, flag);
> +			tty_insert_flip_char(tty_port, c, flag);
>  
>  	} while (--max_count);
>  
> -	tty_flip_buffer_push(port);
> +	tty_flip_buffer_push(tty_port);
>  }
>  
>  /*
> 


-- 
js
suse labs

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

end of thread, other threads:[~2013-02-28 19:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-24 13:08 [PATCH] serial: bcm63xx_uart: fix compilation after "TTY: switch tty_insert_flip_char" Jonas Gorski
2013-02-28 19:53 ` Jiri Slaby

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