]> nv-tegra.nvidia Code Review - linux-2.6.git/blobdiff - drivers/serial/s3c2410.c
[ARM] 2964/1: S3C2410 - serial: add .owner to driver
[linux-2.6.git] / drivers / serial / s3c2410.c
index 5c4678478b1df708d94be1464d240bcf70ffea17..eff2158024c8593feec0285b196e9ad1ab33dc54 100644 (file)
@@ -82,8 +82,6 @@
 #include <asm/arch/regs-serial.h>
 #include <asm/arch/regs-gpio.h>
 
-#include <asm/mach-types.h>
-
 /* structures */
 
 struct s3c24xx_uart_info {
@@ -246,8 +244,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 +254,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 +420,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 +439,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 +518,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 +556,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;
 }
 
@@ -760,8 +751,8 @@ static void s3c24xx_serial_set_termios(struct uart_port *port,
 {
        struct s3c2410_uartcfg *cfg = s3c24xx_port_to_cfg(port);
        struct s3c24xx_uart_port *ourport = to_ourport(port);
-       struct s3c24xx_uart_clksrc *clksrc;
-       struct clk *clk;
+       struct s3c24xx_uart_clksrc *clksrc = NULL;
+       struct clk *clk = NULL;
        unsigned long flags;
        unsigned int baud, quot;
        unsigned int ulcon;
@@ -1244,6 +1235,7 @@ static int s3c2400_serial_probe(struct device *dev)
 
 static struct device_driver s3c2400_serial_drv = {
        .name           = "s3c2400-uart",
+       .owner          = THIS_MODULE,
        .bus            = &platform_bus_type,
        .probe          = s3c2400_serial_probe,
        .remove         = s3c24xx_serial_remove,
@@ -1347,6 +1339,7 @@ static int s3c2410_serial_probe(struct device *dev)
 
 static struct device_driver s3c2410_serial_drv = {
        .name           = "s3c2410-uart",
+       .owner          = THIS_MODULE,
        .bus            = &platform_bus_type,
        .probe          = s3c2410_serial_probe,
        .remove         = s3c24xx_serial_remove,
@@ -1508,6 +1501,7 @@ static int s3c2440_serial_probe(struct device *dev)
 
 static struct device_driver s3c2440_serial_drv = {
        .name           = "s3c2440-uart",
+       .owner          = THIS_MODULE,
        .bus            = &platform_bus_type,
        .probe          = s3c2440_serial_probe,
        .remove         = s3c24xx_serial_remove,