From: Axel Lin Date: Sun, 28 Jun 2015 01:46:43 +0000 (+0800) Subject: serial: etraxfs-uart: Convert to uart_console_device instead of open-coded X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e9bb4b510046d41e3e5a4adc56c76ec8d6812962;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Acked-by: Niklas Cassel Acked-by: Jesper Nilsson Signed-off-by: Greg Kroah-Hartman --- 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,