summaryrefslogtreecommitdiff
path: root/drivers/tty
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2015-09-19 06:43:07 +0300
committerHelge Deller <deller@gmx.de>2015-10-22 16:44:28 +0300
commitaa0bdd2995fb991f0c0f0145303803a0474c93e2 (patch)
tree41e1426dee15e4848227c3daafd99f235e0f2e49 /drivers/tty
parent7bc2d40ea690a37eccc2f514c96c56fdcda626b5 (diff)
downloadlinux-aa0bdd2995fb991f0c0f0145303803a0474c93e2.tar.xz
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>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/mux.c9
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)
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