]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/serial/s3c2410.c
[SERIAL] Clean up and fix tty transmission start/stoping
[linux-2.6-omap-h63xx.git] / drivers / serial / s3c2410.c
index 2a9f7ade2c9d58faa134e84d698d9025af5365b1..c361c6fb08092135171a7165876bb52c27313f19 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;
 }
@@ -246,8 +246,7 @@ static void s3c24xx_serial_rx_disable(struct uart_port *port)
        spin_unlock_irqrestore(&port->lock, flags);
 }
 
-static void
-s3c24xx_serial_stop_tx(struct uart_port *port, unsigned int tty_stop)
+static void s3c24xx_serial_stop_tx(struct uart_port *port)
 {
        if (tx_enabled(port)) {
                disable_irq(TX_IRQ(port));
@@ -257,8 +256,7 @@ s3c24xx_serial_stop_tx(struct uart_port *port, unsigned int tty_stop)
        }
 }
 
-static void
-s3c24xx_serial_start_tx(struct uart_port *port, unsigned int tty_start)
+static void s3c24xx_serial_start_tx(struct uart_port *port)
 {
        if (!tx_enabled(port)) {
                if (port->flags & UPF_CONS_FLOW)
@@ -424,7 +422,7 @@ static irqreturn_t s3c24xx_serial_tx_chars(int irq, void *id, struct pt_regs *re
        */
 
        if (uart_circ_empty(xmit) || uart_tx_stopped(port)) {
-               s3c24xx_serial_stop_tx(port, 0);
+               s3c24xx_serial_stop_tx(port);
                goto out;
        }
 
@@ -443,7 +441,7 @@ static irqreturn_t s3c24xx_serial_tx_chars(int irq, void *id, struct pt_regs *re
                uart_write_wakeup(port);
 
        if (uart_circ_empty(xmit))
-               s3c24xx_serial_stop_tx(port, 0);
+               s3c24xx_serial_stop_tx(port);
 
  out:
        return IRQ_HANDLED;
@@ -522,14 +520,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),
@@ -563,12 +558,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;
 }
 
@@ -903,7 +896,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;
 }