From: Axel Lin Date: Sat, 19 Sep 2015 03:43:07 +0000 (+0800) Subject: serial: mux: Convert to uart_console_device instead of open-coded X-Git-Tag: v4.4-rc1~126^2~90 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=57e7e2a64a49961d2810a6f4f0e1ca2699338ec2;p=platform%2Fkernel%2Flinux-exynos.git serial: mux: Convert to uart_console_device instead of open-coded 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/mux.c b/drivers/tty/serial/mux.c index dd26511..8a4be4b 100644 --- a/drivers/tty/serial/mux.c +++ b/drivers/tty/serial/mux.c @@ -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