diff options
author | Axel Lin <axel.lin@ingics.com> | 2015-09-18 23:43:07 -0400 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2015-10-22 09:44:28 -0400 |
commit | aa0bdd2995fb991f0c0f0145303803a0474c93e2 (patch) | |
tree | 41e1426dee15e4848227c3daafd99f235e0f2e49 | |
parent | 7bc2d40ea690a37eccc2f514c96c56fdcda626b5 (diff) |
parisc: 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 <axel.lin@ingics.com>
Signed-off-by: Helge Deller <deller@gmx.de>
-rw-r--r-- | drivers/tty/serial/mux.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/tty/serial/mux.c b/drivers/tty/serial/mux.c index dd26511ad875..8a4be4b73723 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) | |||
412 | return 0; | 412 | return 0; |
413 | } | 413 | } |
414 | 414 | ||
415 | struct tty_driver *mux_console_device(struct console *co, int *index) | ||
416 | { | ||
417 | *index = co->index; | ||
418 | return mux_driver.tty_driver; | ||
419 | } | ||
420 | |||
421 | static struct console mux_console = { | 415 | static struct console mux_console = { |
422 | .name = "ttyB", | 416 | .name = "ttyB", |
423 | .write = mux_console_write, | 417 | .write = mux_console_write, |
424 | .device = mux_console_device, | 418 | .device = uart_console_device, |
425 | .setup = mux_console_setup, | 419 | .setup = mux_console_setup, |
426 | .flags = CON_ENABLED | CON_PRINTBUFFER, | 420 | .flags = CON_ENABLED | CON_PRINTBUFFER, |
427 | .index = 0, | 421 | .index = 0, |
422 | .data = &mux_driver, | ||
428 | }; | 423 | }; |
429 | 424 | ||
430 | #define MUX_CONSOLE &mux_console | 425 | #define MUX_CONSOLE &mux_console |