[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git-commits-head
Subject:    tty/serial: at91: fix uart/usart selection for older products
From:       "Linux Kernel Mailing List" <linux-kernel () vger ! kernel ! org>
Date:       2013-10-30 20:20:34
Message-ID: 20131030202034.9BC4E660D5B () gitolite ! kernel ! org
[Download RAW message or body]

Gitweb:     http://git.kernel.org/linus/;a=commit;h=6e757ad2c92caf721fd0efaac7088247e3934c5e
Commit:     6e757ad2c92caf721fd0efaac7088247e3934c5e
Parent:     d969de8d83401683420638c8107dcfedb2146f37
Author:     Nicolas Ferre <nicolas.ferre@atmel.com>
AuthorDate: Thu Oct 17 17:37:11 2013 +0200
Committer:  Greg Kroah-Hartman <gregkh@linuxfoundation.org>
CommitDate: Thu Oct 17 13:27:24 2013 -0700

    tty/serial: at91: fix uart/usart selection for older products
    
    Since commit 055560b04a8cd063aea916fd083b7aec02c2adb8 (serial: at91:
    distinguish usart and uart) the older products which do not have a
    name field in their register map are unable to use their serial output.
    As the main console output is usually the serial interface (aka DBGU) it
    is pretty unfortunate.
    So, instead of failing during probe() we just silently configure the serial
    peripheral as an uart. It allows us to use these serial outputs.
    The proper solution is proposed in another patch.
    
    Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/tty/serial/atmel_serial.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index d067285..6b0f75e 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -1499,7 +1499,7 @@ static void atmel_set_ops(struct uart_port *port)
 /*
  * Get ip name usart or uart
  */
-static int atmel_get_ip_name(struct uart_port *port)
+static void atmel_get_ip_name(struct uart_port *port)
 {
 	struct atmel_uart_port *atmel_port = to_atmel_uart_port(port);
 	int name = UART_GET_IP_NAME(port);
@@ -1518,10 +1518,7 @@ static int atmel_get_ip_name(struct uart_port *port)
 		atmel_port->is_usart = false;
 	} else {
 		dev_err(port->dev, "Not supported ip name, set to uart\n");
-		return -EINVAL;
 	}
-
-	return 0;
 }
 
 /*
@@ -2405,9 +2402,7 @@ static int atmel_serial_probe(struct platform_device *pdev)
 	/*
 	 * Get port name of usart or uart
 	 */
-	ret = atmel_get_ip_name(&port->uart);
-	if (ret < 0)
-		goto err_add_port;
+	atmel_get_ip_name(&port->uart);
 
 	return 0;
 
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic