]> Pileus Git - ~andy/linux/blobdiff - drivers/serial/s3c2410.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/aegl/linux-2.6
[~andy/linux] / drivers / serial / s3c2410.c
index ffc61389614b62e02cd241e6602f1cc1464298bd..7365d4b50b954d2729ce1051acb461cc4ac35cc9 100644 (file)
@@ -198,7 +198,7 @@ static inline struct s3c24xx_uart_port *to_ourport(struct uart_port *port)
 
 /* translate a port to the device name */
 
-static inline char *s3c24xx_serial_portname(struct uart_port *port)
+static inline const char *s3c24xx_serial_portname(struct uart_port *port)
 {
        return to_platform_device(port->dev)->name;
 }
@@ -364,7 +364,7 @@ s3c24xx_serial_rx_chars(int irq, void *dev_id, struct pt_regs *regs)
                flag = TTY_NORMAL;
                port->icount.rx++;
 
-               if (uerstat & S3C2410_UERSTAT_ANY) {
+               if (unlikely(uerstat & S3C2410_UERSTAT_ANY)) {
                        dbg("rxerr: port ch=0x%02x, rxs=0x%08x\n",
                            ch, uerstat);
 
@@ -394,20 +394,7 @@ s3c24xx_serial_rx_chars(int irq, void *dev_id, struct pt_regs *regs)
                if (uart_handle_sysrq_char(port, ch, regs))
                        goto ignore_char;
 
-               if ((uerstat & port->ignore_status_mask) == 0) {
-                       tty_insert_flip_char(tty, ch, flag);
-               }
-
-               if ((uerstat & S3C2410_UERSTAT_OVERRUN) &&
-                   tty->flip.count < TTY_FLIPBUF_SIZE) {
-                       /*
-                        * Overrun is special, since it's reported
-                        * immediately, and doesn't affect the current
-                        * character.
-                        */
-
-                       tty_insert_flip_char(tty, 0, TTY_OVERRUN);
-               }
+               uart_insert_char(port, uerstat, S3C2410_UERSTAT_OVERRUN, ch, flag);
 
        ignore_char:
                continue;
@@ -535,14 +522,11 @@ static void s3c24xx_serial_shutdown(struct uart_port *port)
 static int s3c24xx_serial_startup(struct uart_port *port)
 {
        struct s3c24xx_uart_port *ourport = to_ourport(port);
-       unsigned long flags;
        int ret;
 
        dbg("s3c24xx_serial_startup: port=%p (%08lx,%p)\n",
            port->mapbase, port->membase);
 
-       local_irq_save(flags);
-
        rx_enabled(port) = 1;
 
        ret = request_irq(RX_IRQ(port),
@@ -576,12 +560,10 @@ static int s3c24xx_serial_startup(struct uart_port *port)
        /* the port reset code should have done the correct
         * register setup for the port controls */
 
-       local_irq_restore(flags);
        return ret;
 
  err:
        s3c24xx_serial_shutdown(port);
-       local_irq_restore(flags);
        return ret;
 }
 
@@ -916,7 +898,7 @@ static void s3c24xx_serial_release_port(struct uart_port *port)
 
 static int s3c24xx_serial_request_port(struct uart_port *port)
 {
-       char *name = s3c24xx_serial_portname(port);
+       const char *name = s3c24xx_serial_portname(port);
        return request_mem_region(port->mapbase, MAP_SIZE, name) ? 0 : -EBUSY;
 }
 
@@ -1156,7 +1138,7 @@ int s3c24xx_serial_remove(struct device *_dev)
 
 #ifdef CONFIG_PM
 
-int s3c24xx_serial_suspend(struct device *dev, u32 state, u32 level)
+int s3c24xx_serial_suspend(struct device *dev, pm_message_t state, u32 level)
 {
        struct uart_port *port = s3c24xx_dev_to_port(dev);