linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] serial: mux: Convert to uart_console_device instead of open-coded
@ 2015-09-19  3:43 Axel Lin
  0 siblings, 0 replies; only message in thread
From: Axel Lin @ 2015-09-19  3:43 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Daniel Thompson, Jiri Slaby, linux-serial, linux-parisc

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>
---
I don't have this h/w to test, so I'd appreciate if someone can test it.
 drivers/tty/serial/mux.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

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;
-}

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-09-19  3:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-19  3:43 [PATCH] serial: mux: Convert to uart_console_device instead of open-coded Axel Lin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).