serial: Remove redundant console_initcall from s3c and s5p console drivers
authorThomas Abraham <thomas.ab@samsung.com>
Tue, 14 Jun 2011 10:12:26 +0000 (19:12 +0900)
committerKukjin Kim <kgene.kim@samsung.com>
Wed, 20 Jul 2011 10:10:43 +0000 (19:10 +0900)
Uart port is registered as a console during the driver's probe.
So explict registration of console with console_initcall is
removed.

Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
[kgene.kim@samsung.com: removed changes of s3c2400 and s3c24a0]
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
drivers/tty/serial/s3c2410.c
drivers/tty/serial/s3c2412.c
drivers/tty/serial/s3c2440.c
drivers/tty/serial/s3c6400.c
drivers/tty/serial/s5pv210.c
drivers/tty/serial/samsung.c
drivers/tty/serial/samsung.h

index bffe6ff..b1d7e7c 100644 (file)
@@ -96,8 +96,6 @@ static struct platform_driver s3c2410_serial_driver = {
        },
 };
 
-s3c24xx_console_init(&s3c2410_serial_driver, &s3c2410_uart_inf);
-
 static int __init s3c2410_serial_init(void)
 {
        return s3c24xx_serial_init(&s3c2410_serial_driver, &s3c2410_uart_inf);
index 7e2b950..2234bf9 100644 (file)
@@ -130,8 +130,6 @@ static struct platform_driver s3c2412_serial_driver = {
        },
 };
 
-s3c24xx_console_init(&s3c2412_serial_driver, &s3c2412_uart_inf);
-
 static inline int s3c2412_serial_init(void)
 {
        return s3c24xx_serial_init(&s3c2412_serial_driver, &s3c2412_uart_inf);
index 9e10d41..1d0c324 100644 (file)
@@ -159,8 +159,6 @@ static struct platform_driver s3c2440_serial_driver = {
        },
 };
 
-s3c24xx_console_init(&s3c2440_serial_driver, &s3c2440_uart_inf);
-
 static int __init s3c2440_serial_init(void)
 {
        return s3c24xx_serial_init(&s3c2440_serial_driver, &s3c2440_uart_inf);
index ded26c4..e2f6913 100644 (file)
@@ -130,8 +130,6 @@ static struct platform_driver s3c6400_serial_driver = {
        },
 };
 
-s3c24xx_console_init(&s3c6400_serial_driver, &s3c6400_uart_inf);
-
 static int __init s3c6400_serial_init(void)
 {
        return s3c24xx_serial_init(&s3c6400_serial_driver, &s3c6400_uart_inf);
index fb2619f..d6b2423 100644 (file)
@@ -135,13 +135,6 @@ static struct platform_driver s5p_serial_driver = {
        },
 };
 
-static int __init s5pv210_serial_console_init(void)
-{
-       return s3c24xx_serial_initconsole(&s5p_serial_driver, s5p_uart_inf);
-}
-
-console_initcall(s5pv210_serial_console_init);
-
 static int __init s5p_serial_init(void)
 {
        return s3c24xx_serial_init(&s5p_serial_driver, *s5p_uart_inf);
index 014c1c3..7ead421 100644 (file)
@@ -1449,7 +1449,8 @@ static struct console s3c24xx_serial_console = {
        .flags          = CON_PRINTBUFFER,
        .index          = -1,
        .write          = s3c24xx_serial_console_write,
-       .setup          = s3c24xx_serial_console_setup
+       .setup          = s3c24xx_serial_console_setup,
+       .data           = &s3c24xx_uart_drv,
 };
 
 int s3c24xx_serial_initconsole(struct platform_driver *drv,
index 5b098cd..a69d9a5 100644 (file)
@@ -79,25 +79,6 @@ extern int s3c24xx_serial_initconsole(struct platform_driver *drv,
 extern int s3c24xx_serial_init(struct platform_driver *drv,
                               struct s3c24xx_uart_info *info);
 
-#ifdef CONFIG_SERIAL_SAMSUNG_CONSOLE
-
-#define s3c24xx_console_init(__drv, __inf)                             \
-static int __init s3c_serial_console_init(void)                                \
-{                                                                      \
-       struct s3c24xx_uart_info *uinfo[CONFIG_SERIAL_SAMSUNG_UARTS];   \
-       int i;                                                          \
-                                                                       \
-       for (i = 0; i < CONFIG_SERIAL_SAMSUNG_UARTS; i++)               \
-               uinfo[i] = __inf;                                       \
-       return s3c24xx_serial_initconsole(__drv, uinfo);                \
-}                                                                      \
-                                                                       \
-console_initcall(s3c_serial_console_init)
-
-#else
-#define s3c24xx_console_init(drv, inf) extern void no_console(void)
-#endif
-
 #ifdef CONFIG_SERIAL_SAMSUNG_DEBUG
 
 extern void printascii(const char *);