]> git.karo-electronics.de Git - linux-beck.git/commitdiff
parisc: serial/mux: Convert to uart_console_device instead of open-coded
authorAxel Lin <axel.lin@ingics.com>
Sat, 19 Sep 2015 03:43:07 +0000 (11:43 +0800)
committerHelge Deller <deller@gmx.de>
Thu, 22 Oct 2015 13:44:28 +0000 (15:44 +0200)
The implementation of mux_console_device() is very similar to
uart_console_device(). Setting .data field in mux_console then we can
convert to use uart_console_device().

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Helge Deller <deller@gmx.de>
drivers/tty/serial/mux.c

index dd26511ad8754fa171114c96c18fdd01e4e66d73..8a4be4b73723381a6bcba7b89cb1137ed3b5ac96 100644 (file)
@@ -412,19 +412,14 @@ static int mux_console_setup(struct console *co, char *options)
         return 0;
 }
 
-struct tty_driver *mux_console_device(struct console *co, int *index)
-{
-        *index = co->index;
-       return mux_driver.tty_driver;
-}
-
 static struct console mux_console = {
        .name =         "ttyB",
        .write =        mux_console_write,
-       .device =       mux_console_device,
+       .device =       uart_console_device,
        .setup =        mux_console_setup,
        .flags =        CON_ENABLED | CON_PRINTBUFFER,
        .index =        0,
+       .data =         &mux_driver,
 };
 
 #define MUX_CONSOLE    &mux_console