Merge branch 'sched/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip...
[pandora-kernel.git] / drivers / serial / s3c2410.c
index e773c8e..2b6a013 100644 (file)
@@ -1022,6 +1022,7 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport,
        struct uart_port *port = &ourport->port;
        struct s3c2410_uartcfg *cfg;
        struct resource *res;
+       int ret;
 
        dbg("s3c24xx_serial_init_port: port=%p, platdev=%p\n", port, platdev);
 
@@ -1064,9 +1065,11 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport,
 
        port->mapbase   = res->start;
        port->membase   = S3C24XX_VA_UART + (res->start - S3C24XX_PA_UART);
-       port->irq       = platform_get_irq(platdev, 0);
-       if (port->irq < 0)
+       ret = platform_get_irq(platdev, 0);
+       if (ret < 0)
                port->irq = 0;
+       else
+               port->irq = ret;
 
        ourport->clk    = clk_get(&platdev->dev, "uart");
 
@@ -1093,13 +1096,13 @@ static int s3c24xx_serial_probe(struct platform_device *dev,
        ourport = &s3c24xx_serial_ports[probe_index];
        probe_index++;
 
-       dbg("%s: initialising port %p...\n", __FUNCTION__, ourport);
+       dbg("%s: initialising port %p...\n", __func__, ourport);
 
        ret = s3c24xx_serial_init_port(ourport, info, dev);
        if (ret < 0)
                goto probe_err;
 
-       dbg("%s: adding port\n", __FUNCTION__);
+       dbg("%s: adding port\n", __func__);
        uart_add_one_port(&s3c24xx_uart_drv, &ourport->port);
        platform_set_drvdata(dev, &ourport->port);
 
@@ -1527,7 +1530,7 @@ static inline void s3c2440_serial_exit(void)
 #define s3c2440_uart_inf_at NULL
 #endif /* CONFIG_CPU_S3C2440 */
 
-#if defined(CONFIG_CPU_S3C2412) || defined(CONFIG_CPU_S3C2413)
+#if defined(CONFIG_CPU_S3C2412)
 
 static int s3c2412_serial_setsource(struct uart_port *port,
                                     struct s3c24xx_uart_clksrc *clk)
@@ -1584,7 +1587,7 @@ static int s3c2412_serial_resetport(struct uart_port *port,
        unsigned long ucon = rd_regl(port, S3C2410_UCON);
 
        dbg("%s: port=%p (%08lx), cfg=%p\n",
-           __FUNCTION__, port, port->mapbase, cfg);
+           __func__, port, port->mapbase, cfg);
 
        /* ensure we don't change the clock settings... */
 
@@ -1935,3 +1938,7 @@ console_initcall(s3c24xx_serial_initconsole);
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>");
 MODULE_DESCRIPTION("Samsung S3C2410/S3C2440/S3C2412 Serial port driver");
+MODULE_ALIAS("platform:s3c2400-uart");
+MODULE_ALIAS("platform:s3c2410-uart");
+MODULE_ALIAS("platform:s3c2412-uart");
+MODULE_ALIAS("platform:s3c2440-uart");