Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d28122a5877cc40350fa801353fd5a9350563ec3
Commit:     d28122a5877cc40350fa801353fd5a9350563ec3
Parent:     7f215abc69302dc027f024fe656e4841063e8fe8
Author:     Russell King <[EMAIL PROTECTED]>
AuthorDate: Mon Jan 22 18:59:42 2007 +0000
Committer:  Russell King <[EMAIL PROTECTED]>
CommitDate: Wed Jan 24 11:59:57 2007 +0000

    [ARM] Fix AMBA serial drivers for non-first serial ports
    
    Using console=ttyAM1 or console=ttyAMA1 resulted in an oops during
    boot due to trying to drive the console before that port had been
    registered.  Fix this by checking whether the port is present before
    allowing console setup to proceed.
    
    Signed-off-by: Russell King <[EMAIL PROTECTED]>
---
 drivers/serial/amba-pl010.c |    2 ++
 drivers/serial/amba-pl011.c |    2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/serial/amba-pl010.c b/drivers/serial/amba-pl010.c
index 61db697..f69bd09 100644
--- a/drivers/serial/amba-pl010.c
+++ b/drivers/serial/amba-pl010.c
@@ -589,6 +589,8 @@ static int __init pl010_console_setup(struct console *co, 
char *options)
         */
        if (co->index >= UART_NR)
                co->index = 0;
+       if (!amba_ports[co->index])
+               return -ENODEV;
        port = &amba_ports[co->index]->port;
 
        if (options)
diff --git a/drivers/serial/amba-pl011.c b/drivers/serial/amba-pl011.c
index 9a3b374..44639e7 100644
--- a/drivers/serial/amba-pl011.c
+++ b/drivers/serial/amba-pl011.c
@@ -661,6 +661,8 @@ static int __init pl011_console_setup(struct console *co, 
char *options)
        if (co->index >= UART_NR)
                co->index = 0;
        uap = amba_ports[co->index];
+       if (!uap)
+               return -ENODEV;
 
        uap->port.uartclk = clk_get_rate(uap->clk);
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to