[ARM] 5050/1: S3C2410: Cleanup header on S3C2410 serial driver
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / serial / s3c2410.c
index e773c8e1496245bcaca63984bc9ff07ac055c4f9..c32cf93d7a43a7a4103922b7fa727479e838fb83 100644 (file)
@@ -1,36 +1,9 @@
-/*
- * linux/drivers/serial/s3c2410.c
- *
- * Driver for onboard UARTs on the Samsung S3C24XX
- *
- * Based on drivers/char/serial.c and drivers/char/21285.c
- *
- * Ben Dooks, (c) 2003-2005 Simtec Electronics
- *     http://www.simtec.co.uk/products/SWLINUX/
- *
- * Changelog:
- *
- * 22-Jul-2004  BJD  Finished off device rewrite
+/* linux/drivers/serial/s3c2410.c
  *
- * 21-Jul-2004  BJD  Thanks to <herbet@13thfloor.at> for pointing out
- *                   problems with baud rate and loss of IR settings. Update
- *                   to add configuration via platform_device structure
+ * Driver for Samsung SoC onboard UARTs.
  *
- * 28-Sep-2004  BJD  Re-write for the following items
- *                  - S3C2410 and S3C2440 serial support
- *                  - Power Management support
- *                  - Fix console via IrDA devices
- *                  - SysReq (Herbert Pötzl)
- *                  - Break character handling (Herbert Pötzl)
- *                  - spin-lock initialisation (Dimitry Andric)
- *                  - added clock control
- *                  - updated init code to use platform_device info
- *
- * 06-Mar-2005  BJD  Add s3c2440 fclk clock source
- *
- * 09-Mar-2005  BJD  Add s3c2400 support
- *
- * 10-Mar-2005  LCVR Changed S3C2410_VA_UART to S3C24XX_VA_UART
+ * Ben Dooks, Copyright (c) 2003-2005 Simtec Electronics
+ *     http://armlinux.simtec.co.uk/
 */
 
 /* Note on 2440 fclk clock source handling
@@ -1022,6 +995,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 +1038,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 +1069,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 +1503,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 +1560,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 +1911,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");