]> git.karo-electronics.de Git - linux-beck.git/commitdiff
serial: etraxfs-uart: Convert to uart_console_device instead of open-coded
authorAxel Lin <axel.lin@ingics.com>
Sun, 28 Jun 2015 01:46:43 +0000 (09:46 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Jul 2015 22:24:12 +0000 (15:24 -0700)
The implementation of cris_console_device() is exactly the same as
uart_console_device(), so let's switch to use uart_console_device().

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Niklas Cassel <nks@flawful.org>
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/etraxfs-uart.c

index a57301a6fe427027788aa2153547928597c71ed1..7444ca3e616bada142f2e295b3465966b419e2d3 100644 (file)
@@ -112,17 +112,10 @@ cris_console_setup(struct console *co, char *options)
        return 0;
 }
 
-static struct tty_driver *cris_console_device(struct console *co, int *index)
-{
-       struct uart_driver *p = co->data;
-       *index = co->index;
-       return p->tty_driver;
-}
-
 static struct console cris_console = {
        .name = "ttyS",
        .write = cris_console_write,
-       .device = cris_console_device,
+       .device = uart_console_device,
        .setup = cris_console_setup,
        .flags = CON_PRINTBUFFER,
        .index = -1,