of: Always use 'struct device.of_node' to get device node pointer.
[safe/jmp/linux-2.6] / drivers / serial / sunhv.c
index e41766d..d1eedf1 100644 (file)
@@ -184,8 +184,8 @@ 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->port.tty;
+       if (port->state != NULL)                /* Unopened serial console */
+               tty = port->state->port.tty;
 
        if (sunhv_ops->receive_chars(port, tty))
                sun_do_break();
@@ -197,10 +197,10 @@ static void transmit_chars(struct uart_port *port)
 {
        struct circ_buf *xmit;
 
-       if (!port->info)
+       if (!port->state)
                return;
 
-       xmit = &port->info->xmit;
+       xmit = &port->state->xmit;
        if (uart_circ_empty(xmit) || uart_tx_stopped(port))
                return;
 
@@ -461,7 +461,7 @@ static void sunhv_console_write_paged(struct console *con, const char *s, unsign
                                        break;
                                udelay(1);
                        }
-                       if (limit <= 0)
+                       if (limit < 0)
                                break;
                        page_bytes -= written;
                        ra += written;
@@ -565,8 +565,8 @@ static int __devinit hv_probe(struct of_device *op, const struct of_device_id *m
        if (err)
                goto out_free_con_read_page;
 
-       sunserial_console_match(&sunhv_console, op->node,
-                               &sunhv_reg, port->line);
+       sunserial_console_match(&sunhv_console, op->dev.of_node,
+                               &sunhv_reg, port->line, false);
 
        err = uart_add_one_port(&sunhv_reg, port);
        if (err)
@@ -616,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",