serial: suncore: Add 'ignore_line' argument to sunserial_console_match().
[pandora-kernel.git] / drivers / serial / sunsu.c
index 47c6837..4868b31 100644 (file)
@@ -311,7 +311,7 @@ static void sunsu_enable_ms(struct uart_port *port)
 static struct tty_struct *
 receive_chars(struct uart_sunsu_port *up, unsigned char *status)
 {
-       struct tty_struct *tty = up->port.info->port.tty;
+       struct tty_struct *tty = up->port.state->port.tty;
        unsigned char ch, flag;
        int max_count = 256;
        int saw_console_brk = 0;
@@ -389,7 +389,7 @@ receive_chars(struct uart_sunsu_port *up, unsigned char *status)
 
 static void transmit_chars(struct uart_sunsu_port *up)
 {
-       struct circ_buf *xmit = &up->port.info->xmit;
+       struct circ_buf *xmit = &up->port.state->xmit;
        int count;
 
        if (up->port.x_char) {
@@ -441,7 +441,7 @@ static void check_modem_status(struct uart_sunsu_port *up)
        if (status & UART_MSR_DCTS)
                uart_handle_cts_change(&up->port, status & UART_MSR_CTS);
 
-       wake_up_interruptible(&up->port.info->delta_msr_wait);
+       wake_up_interruptible(&up->port.state->port.delta_msr_wait);
 }
 
 static irqreturn_t sunsu_serial_interrupt(int irq, void *dev_id)
@@ -1468,7 +1468,8 @@ static int __devinit su_probe(struct of_device *op, const struct of_device_id *m
        up->port.ops = &sunsu_pops;
 
        sunserial_console_match(SUNSU_CONSOLE(), dp,
-                               &sunsu_reg, up->port.line);
+                               &sunsu_reg, up->port.line,
+                               false);
        err = uart_add_one_port(&sunsu_reg, &up->port);
        if (err)
                goto out_unmap;
@@ -1517,6 +1518,10 @@ static const struct of_device_id su_match[] = {
                .name = "serial",
                .compatible = "su",
        },
+       {
+               .type = "serial",
+               .compatible = "su",
+       },
        {},
 };
 MODULE_DEVICE_TABLE(of, su_match);
@@ -1548,6 +1553,12 @@ static int __init sunsu_init(void)
                                num_uart++;
                }
        }
+       for_each_node_by_type(dp, "serial") {
+               if (of_device_is_compatible(dp, "su")) {
+                       if (su_get_type(dp) == SU_PORT_PORT)
+                               num_uart++;
+               }
+       }
 
        if (num_uart) {
                err = sunserial_register_minors(&sunsu_reg, num_uart);