mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-27 06:04:23 +08:00
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>
This commit is contained in:
parent
7bc2d40ea6
commit
aa0bdd2995
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user