drivers/isdn/i4l/isdn_tty.c: fix check for array overindexing
[safe/jmp/linux-2.6] / drivers / serial / sunhv.c
index 145c028..a94a2ab 100644 (file)
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/init.h>
+#include <linux/of_device.h>
 
 #include <asm/hypervisor.h>
 #include <asm/spitfire.h>
 #include <asm/prom.h>
-#include <asm/of_device.h>
 #include <asm/irq.h>
 
 #if defined(CONFIG_MAGIC_SYSRQ)
@@ -185,7 +185,7 @@ static struct tty_struct *receive_chars(struct uart_port *port)
        struct tty_struct *tty = NULL;
 
        if (port->info != NULL)         /* Unopened serial console */
-               tty = port->info->tty;
+               tty = port->info->port.tty;
 
        if (sunhv_ops->receive_chars(port, tty))
                sun_do_break();
@@ -499,7 +499,6 @@ static void sunhv_console_write_bychar(struct console *con, const char *s, unsig
        } else
                spin_lock(&port->lock);
 
-       spin_lock_irqsave(&port->lock, flags);
        for (i = 0; i < n; i++) {
                if (*s == '\n')
                        sunhv_console_putchar(port, '\r');
@@ -617,7 +616,7 @@ static int __devexit hv_remove(struct of_device *dev)
        return 0;
 }
 
-static struct of_device_id hv_match[] = {
+static const struct of_device_id hv_match[] = {
        {
                .name = "console",
                .compatible = "qcn",