summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/etraxfs-uart.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2015-06-28 04:46:43 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-07-24 01:24:12 +0300
commite9bb4b510046d41e3e5a4adc56c76ec8d6812962 (patch)
tree7f684c1fdb80f81377b3927b40441c6d77ccf2dd /drivers/tty/serial/etraxfs-uart.c
parent5bac4b3d2592c281a9b2614070140b116bd0b0a9 (diff)
downloadlinux-e9bb4b510046d41e3e5a4adc56c76ec8d6812962.tar.xz
serial: etraxfs-uart: Convert to uart_console_device instead of open-coded
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>
Diffstat (limited to 'drivers/tty/serial/etraxfs-uart.c')
-rw-r--r--drivers/tty/serial/etraxfs-uart.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/tty/serial/etraxfs-uart.c b/drivers/tty/serial/etraxfs-uart.c
index a57301a6fe42..7444ca3e616b 100644
--- a/drivers/tty/serial/etraxfs-uart.c
+++ b/drivers/tty/serial/etraxfs-uart.c
@@ -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,