tty/of_serial: add missing ns16550a id
[safe/jmp/linux-2.6] / drivers / serial / sa1100.c
index 67b2338..2199d81 100644 (file)
@@ -20,9 +20,6 @@
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- *  $Id: sa1100.c,v 1.50 2002/07/29 14:41:04 rmk Exp $
- *
  */
 
 #if defined(CONFIG_SERIAL_SA1100_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
 #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 <asm/hardware.h>
+#include <mach/hardware.h>
 #include <asm/mach/serial_sa1100.h>
 
 /* We've been assigned a range on the "Low-density serial ports" major */
@@ -120,7 +117,7 @@ static void sa1100_mctrl_check(struct sa1100_port *sport)
        if (changed & TIOCM_CTS)
                uart_handle_cts_change(&sport->port, status & TIOCM_CTS);
 
-       wake_up_interruptible(&sport->port.info->delta_msr_wait);
+       wake_up_interruptible(&sport->port.state->port.delta_msr_wait);
 }
 
 /*
@@ -132,7 +129,7 @@ static void sa1100_timeout(unsigned long data)
        struct sa1100_port *sport = (struct sa1100_port *)data;
        unsigned long flags;
 
-       if (sport->port.info) {
+       if (sport->port.state) {
                spin_lock_irqsave(&sport->port.lock, flags);
                sa1100_mctrl_check(sport);
                spin_unlock_irqrestore(&sport->port.lock, flags);
@@ -192,7 +189,7 @@ static void sa1100_enable_ms(struct uart_port *port)
 static void
 sa1100_rx_chars(struct sa1100_port *sport)
 {
-       struct tty_struct *tty = sport->port.info->tty;
+       struct tty_struct *tty = sport->port.state->port.tty;
        unsigned int status, ch, flg;
 
        status = UTSR1_TO_SM(UART_GET_UTSR1(sport)) |
@@ -242,7 +239,7 @@ sa1100_rx_chars(struct sa1100_port *sport)
 
 static void sa1100_tx_chars(struct sa1100_port *sport)
 {
-       struct circ_buf *xmit = &sport->port.info->xmit;
+       struct circ_buf *xmit = &sport->port.state->xmit;
 
        if (sport->port.x_char) {
                UART_PUT_CHAR(sport, sport->port.x_char);
@@ -641,7 +638,7 @@ static void __init sa1100_init_ports(void)
        PPSR |= PPC_TXD1 | PPC_TXD3;
 }
 
-void __init sa1100_register_uart_fns(struct sa1100_port_fns *fns)
+void __devinit sa1100_register_uart_fns(struct sa1100_port_fns *fns)
 {
        if (fns->get_mctrl)
                sa1100_pops.get_mctrl = fns->get_mctrl;
@@ -655,7 +652,7 @@ void __init sa1100_register_uart_fns(struct sa1100_port_fns *fns)
 void __init sa1100_register_uart(int idx, int port)
 {
        if (idx >= NR_PORTS) {
-               printk(KERN_ERR "%s: bad index number %d\n", __FUNCTION__, idx);
+               printk(KERN_ERR "%s: bad index number %d\n", __func__, idx);
                return;
        }
 
@@ -682,7 +679,7 @@ void __init sa1100_register_uart(int idx, int port)
                break;
 
        default:
-               printk(KERN_ERR "%s: bad port number %d\n", __FUNCTION__, port);
+               printk(KERN_ERR "%s: bad port number %d\n", __func__, port);
        }
 }
 
@@ -892,7 +889,7 @@ static int __init sa1100_serial_init(void)
 {
        int ret;
 
-       printk(KERN_INFO "Serial: SA11x0 driver $Revision: 1.50 $\n");
+       printk(KERN_INFO "Serial: SA11x0 driver\n");
 
        sa1100_init_ports();
 
@@ -915,7 +912,7 @@ module_init(sa1100_serial_init);
 module_exit(sa1100_serial_exit);
 
 MODULE_AUTHOR("Deep Blue Solutions Ltd");
-MODULE_DESCRIPTION("SA1100 generic serial port driver $Revision: 1.50 $");
+MODULE_DESCRIPTION("SA1100 generic serial port driver");
 MODULE_LICENSE("GPL");
 MODULE_ALIAS_CHARDEV_MAJOR(SERIAL_SA1100_MAJOR);
 MODULE_ALIAS("platform:sa11x0-uart");