From 978e595f88a1fba5869aa42a4af4fba36f33ecac Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Wed, 30 Apr 2008 00:53:59 -0700 Subject: tty/serial: lay the foundations for the next set of reworks - Stop drivers calling their own flush method indirectly, it obfuscates code and it will change soon anyway - A few more lock_kernel paths temporarily needed in some driver internal waiting code - Remove private put_char method that does a write call for one char - we have that anyway - Most but not yet all of the termios copy under lock fixing (some has other dependencies to follow) - Note a few locking bugs in drivers found in the process - Kill remaining [ab]users of TIOCG/SSOFTCAR in the driver, these must go to fix the termios locking Signed-off-by: Alan Cox Cc: Jiri Slaby Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/char/nozomi.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'drivers/char/nozomi.c') diff --git a/drivers/char/nozomi.c b/drivers/char/nozomi.c index 6a6843a0a67..b55c933d558 100644 --- a/drivers/char/nozomi.c +++ b/drivers/char/nozomi.c @@ -1724,6 +1724,8 @@ static int ntty_tiocmget(struct tty_struct *tty, struct file *file) const struct ctrl_dl *ctrl_dl = &port->ctrl_dl; const struct ctrl_ul *ctrl_ul = &port->ctrl_ul; + /* Note: these could change under us but it is not clear this + matters if so */ return (ctrl_ul->RTS ? TIOCM_RTS : 0) | (ctrl_ul->DTR ? TIOCM_DTR : 0) | (ctrl_dl->DCD ? TIOCM_CAR : 0) | @@ -1849,16 +1851,6 @@ static void ntty_throttle(struct tty_struct *tty) spin_unlock_irqrestore(&dc->spin_mutex, flags); } -/* just to discard single character writes */ -static void ntty_put_char(struct tty_struct *tty, unsigned char c) -{ - /* - * card does not react correct when we write single chars - * to the card, so we discard them - */ - DBG2("PUT CHAR Function: %c", c); -} - /* Returns number of chars in buffer, called by tty layer */ static s32 ntty_chars_in_buffer(struct tty_struct *tty) { @@ -1892,7 +1884,6 @@ static const struct tty_operations tty_ops = { .unthrottle = ntty_unthrottle, .throttle = ntty_throttle, .chars_in_buffer = ntty_chars_in_buffer, - .put_char = ntty_put_char, .tiocmget = ntty_tiocmget, .tiocmset = ntty_tiocmset, }; -- cgit v1.2.3