fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / drivers / serial / ioc4_serial.c
index 576ca1e..c862f67 100644 (file)
@@ -921,7 +921,7 @@ static void handle_dma_error_intr(void *arg, uint32_t other_ir)
 {
        struct ioc4_port *port = (struct ioc4_port *)arg;
        struct hooks *hooks = port->ip_hooks;
-       unsigned int flags;
+       unsigned long flags;
 
        spin_lock_irqsave(&port->ip_lock, flags);
 
@@ -987,10 +987,9 @@ intr_connect(struct ioc4_soft *soft, int type,
  * ioc4_intr - Top level IOC4 interrupt handler.
  * @irq: irq value
  * @arg: handler arg
- * @regs: registers
  */
 
-static irqreturn_t ioc4_intr(int irq, void *arg, struct pt_regs *regs)
+static irqreturn_t ioc4_intr(int irq, void *arg)
 {
        struct ioc4_soft *soft;
        uint32_t this_ir, this_mir;
@@ -1682,7 +1681,7 @@ static void transmit_chars(struct uart_port *the_port)
  */
 static void
 ioc4_change_speed(struct uart_port *the_port,
-                 struct termios *new_termios, struct termios *old_termios)
+                 struct ktermios *new_termios, struct ktermios *old_termios)
 {
        struct ioc4_port *port = get_ioc4_port(the_port, 0);
        int baud, bits;
@@ -1803,7 +1802,7 @@ static inline int ic4_startup_local(struct uart_port *the_port)
        ioc4_set_proto(port, the_port->mapbase);
 
        /* set the speed of the serial port */
-       ioc4_change_speed(the_port, info->tty->termios, (struct termios *)0);
+       ioc4_change_speed(the_port, info->tty->termios, (struct ktermios *)0);
 
        return 0;
 }
@@ -1835,7 +1834,7 @@ static void handle_intr(void *arg, uint32_t sio_ir)
        struct ioc4_port *port = (struct ioc4_port *)arg;
        struct hooks *hooks = port->ip_hooks;
        unsigned int rx_high_rd_aborted = 0;
-       unsigned int flags;
+       unsigned long flags;
        struct uart_port *the_port;
        int loop_counter;
 
@@ -2571,7 +2570,7 @@ static int ic4_startup(struct uart_port *the_port)
  */
 static void
 ic4_set_termios(struct uart_port *the_port,
-               struct termios *termios, struct termios *old_termios)
+               struct ktermios *termios, struct ktermios *old_termios)
 {
        unsigned long port_flags;
 
@@ -2685,6 +2684,7 @@ static int ioc4_serial_remove_one(struct ioc4_driver_data *idd)
        if (soft) {
                free_irq(control->ic_irq, soft);
                if (soft->is_ioc4_serial_addr) {
+                       iounmap(soft->is_ioc4_serial_addr);
                        release_region((unsigned long)
                             soft->is_ioc4_serial_addr,
                                sizeof(struct ioc4_serial));
@@ -2887,6 +2887,8 @@ out4:
 out3:
        kfree(control);
 out2:
+       if (serial)
+               iounmap(serial);
        release_region(tmp_addr1, sizeof(struct ioc4_serial));
 out1:
 
@@ -2933,7 +2935,7 @@ static void __devexit ioc4_serial_exit(void)
        uart_unregister_driver(&ioc4_uart_rs422);
 }
 
-module_init(ioc4_serial_init);
+late_initcall(ioc4_serial_init); /* Call only after tty init is done */
 module_exit(ioc4_serial_exit);
 
 MODULE_AUTHOR("Pat Gefre - Silicon Graphics Inc. (SGI) <pfg@sgi.com>");