Add Station and AdHoc mode support to libertas_tf
[safe/jmp/linux-2.6] / drivers / serial / serial_lh7a40x.c
index eb18d42..ea74470 100644 (file)
 #include <linux/tty_flip.h>
 #include <linux/serial_core.h>
 #include <linux/serial.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/irq.h>
+#include <mach/hardware.h>
 
 #define DEV_MAJOR      204
 #define DEV_MINOR      16
@@ -137,7 +138,7 @@ static void lh7a40xuart_enable_ms (struct uart_port* port)
 
 static void lh7a40xuart_rx_chars (struct uart_port* port)
 {
-       struct tty_struct* tty = port->info->tty;
+       struct tty_struct* tty = port->state->port.tty;
        int cbRxMax = 256;      /* (Gross) limit on receive */
        unsigned int data;      /* Received data and status */
        unsigned int flag;
@@ -183,7 +184,7 @@ static void lh7a40xuart_rx_chars (struct uart_port* port)
 
 static void lh7a40xuart_tx_chars (struct uart_port* port)
 {
-       struct circ_buf* xmit = &port->info->xmit;
+       struct circ_buf* xmit = &port->state->xmit;
        int cbTxMax = port->fifosize;
 
        if (port->x_char) {
@@ -240,7 +241,7 @@ static void lh7a40xuart_modem_status (struct uart_port* port)
        if (delta & CTS)
                uart_handle_cts_change (port, status & CTS);
 
-       wake_up_interruptible (&port->info->delta_msr_wait);
+       wake_up_interruptible (&port->state->port.delta_msr_wait);
 }
 
 static irqreturn_t lh7a40xuart_int (int irq, void* dev_id)
@@ -460,7 +461,7 @@ static int lh7a40xuart_verify_port (struct uart_port* port,
 
        if (ser->type != PORT_UNKNOWN && ser->type != PORT_LH7A40X)
                ret = -EINVAL;
-       if (ser->irq < 0 || ser->irq >= NR_IRQS)
+       if (ser->irq < 0 || ser->irq >= nr_irqs)
                ret = -EINVAL;
        if (ser->baud_base < 9600) /* *** FIXME: is this true? */
                ret = -EINVAL;