m68knommu: fix broken use of BUAD_TABLE_SIZE in 68328serial driver
[safe/jmp/linux-2.6] / drivers / serial / ioc3_serial.c
index de4ab1b..f164ba4 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/pci.h>
 #include <linux/serial_core.h>
 #include <linux/ioc3.h>
+#include <linux/slab.h>
 
 /*
  * Interesting things about the ioc3
@@ -1287,7 +1288,7 @@ static inline int do_read(struct uart_port *the_port, char *buf, int len)
                                                        (port->ip_port, 0);
                                                wake_up_interruptible
                                                    (&the_port->state->
-                                                    delta_msr_wait);
+                                                    port.delta_msr_wait);
                                        }
 
                                        /* If we had any data to return, we
@@ -1411,8 +1412,7 @@ static int receive_chars(struct uart_port *the_port)
        read_count = do_read(the_port, ch, MAX_CHARS);
        if (read_count > 0) {
                flip = 1;
-               read_room = tty_buffer_request_room(tty, read_count);
-               tty_insert_flip_string(tty, ch, read_room);
+               read_room = tty_insert_flip_string(tty, ch, read_count);
                the_port->icount.rx += read_count;
        }
        spin_unlock_irqrestore(&the_port->lock, pflags);
@@ -1491,7 +1491,7 @@ ioc3uart_intr_one(struct ioc3_submodule *is,
                                uart_handle_dcd_change(the_port,
                                                shadow & SHADOW_DCD);
                                wake_up_interruptible
-                                   (&the_port->state->delta_msr_wait);
+                                   (&the_port->state->port.delta_msr_wait);
                        } else if ((port->ip_notify & N_DDCD)
                                   && !(shadow & SHADOW_DCD)) {
                                /* Flag delta DCD/no DCD */
@@ -1511,7 +1511,7 @@ ioc3uart_intr_one(struct ioc3_submodule *is,
                                uart_handle_cts_change(the_port, shadow
                                                & SHADOW_CTS);
                                wake_up_interruptible
-                                   (&the_port->state->delta_msr_wait);
+                                   (&the_port->state->port.delta_msr_wait);
                        }
                }
 
@@ -1728,7 +1728,7 @@ static void ic3_shutdown(struct uart_port *the_port)
                return;
 
        state = the_port->state;
-       wake_up_interruptible(&state->delta_msr_wait);
+       wake_up_interruptible(&state->port.delta_msr_wait);
 
        spin_lock_irqsave(&the_port->lock, port_flags);
        set_notification(port, N_ALL, 0);
@@ -2162,7 +2162,7 @@ static struct ioc3_submodule ioc3uart_ops = {
 /**
  * ioc3_detect - module init called,
  */
-static int __devinit ioc3uart_init(void)
+static int __init ioc3uart_init(void)
 {
        int ret;
 
@@ -2179,7 +2179,7 @@ static int __devinit ioc3uart_init(void)
        return ret;
 }
 
-static void __devexit ioc3uart_exit(void)
+static void __exit ioc3uart_exit(void)
 {
        ioc3_unregister_submodule(&ioc3uart_ops);
        uart_unregister_driver(&ioc3_uart);