[ARM] 5519/1: amba probe: pass "struct amba_id *" instead of void *
[safe/jmp/linux-2.6] / drivers / serial / amba-pl010.c
index 1a9a24b..cdc049d 100644 (file)
@@ -22,8 +22,6 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
- *  $Id: amba.c,v 1.41 2002/07/28 10:03:27 rmk Exp $
- *
  * This is a generic driver for ARM AMBA-type serial ports.  They
  * have a lot of 16550-like features, but are not register compatible.
  * Note that although they do have CTS, DCD and DSR inputs, they do
@@ -119,7 +117,7 @@ static void pl010_enable_ms(struct uart_port *port)
 
 static void pl010_rx_chars(struct uart_amba_port *uap)
 {
-       struct tty_struct *tty = uap->port.info->tty;
+       struct tty_struct *tty = uap->port.info->port.tty;
        unsigned int status, ch, flag, rsr, max_count = 256;
 
        status = readb(uap->port.membase + UART01x_FR);
@@ -167,8 +165,9 @@ static void pl010_rx_chars(struct uart_amba_port *uap)
        ignore_char:
                status = readb(uap->port.membase + UART01x_FR);
        }
+       spin_unlock(&uap->port.lock);
        tty_flip_buffer_push(tty);
-       return;
+       spin_lock(&uap->port.lock);
 }
 
 static void pl010_tx_chars(struct uart_amba_port *uap)
@@ -513,7 +512,7 @@ static int pl010_verify_port(struct uart_port *port, struct serial_struct *ser)
        int ret = 0;
        if (ser->type != PORT_UNKNOWN && ser->type != PORT_AMBA)
                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)
                ret = -EINVAL;
@@ -666,7 +665,7 @@ static struct uart_driver amba_reg = {
        .cons                   = AMBA_CONSOLE,
 };
 
-static int pl010_probe(struct amba_device *dev, void *id)
+static int pl010_probe(struct amba_device *dev, struct amba_id *id)
 {
        struct uart_amba_port *uap;
        void __iomem *base;
@@ -693,7 +692,7 @@ static int pl010_probe(struct amba_device *dev, void *id)
                goto free;
        }
 
-       uap->clk = clk_get(&dev->dev, "UARTCLK");
+       uap->clk = clk_get(&dev->dev, NULL);
        if (IS_ERR(uap->clk)) {
                ret = PTR_ERR(uap->clk);
                goto unmap;
@@ -790,7 +789,7 @@ static int __init pl010_init(void)
 {
        int ret;
 
-       printk(KERN_INFO "Serial: AMBA driver $Revision: 1.41 $\n");
+       printk(KERN_INFO "Serial: AMBA driver\n");
 
        ret = uart_register_driver(&amba_reg);
        if (ret == 0) {
@@ -811,5 +810,5 @@ module_init(pl010_init);
 module_exit(pl010_exit);
 
 MODULE_AUTHOR("ARM Ltd/Deep Blue Solutions Ltd");
-MODULE_DESCRIPTION("ARM AMBA serial port driver $Revision: 1.41 $");
+MODULE_DESCRIPTION("ARM AMBA serial port driver");
 MODULE_LICENSE("GPL");