diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2008-04-30 03:53:59 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-30 11:29:45 -0400 |
commit | 978e595f88a1fba5869aa42a4af4fba36f33ecac (patch) | |
tree | 60848f49949c5b7b518621ee36cdc6d500244539 /drivers/char/nozomi.c | |
parent | ac0e4b7d319bf284bb64bc7e1c051417386b34a4 (diff) |
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 <alan@redhat.com>
Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/nozomi.c')
-rw-r--r-- | drivers/char/nozomi.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/char/nozomi.c b/drivers/char/nozomi.c index 6a6843a0a674..b55c933d5585 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) | |||
1724 | const struct ctrl_dl *ctrl_dl = &port->ctrl_dl; | 1724 | const struct ctrl_dl *ctrl_dl = &port->ctrl_dl; |
1725 | const struct ctrl_ul *ctrl_ul = &port->ctrl_ul; | 1725 | const struct ctrl_ul *ctrl_ul = &port->ctrl_ul; |
1726 | 1726 | ||
1727 | /* Note: these could change under us but it is not clear this | ||
1728 | matters if so */ | ||
1727 | return (ctrl_ul->RTS ? TIOCM_RTS : 0) | | 1729 | return (ctrl_ul->RTS ? TIOCM_RTS : 0) | |
1728 | (ctrl_ul->DTR ? TIOCM_DTR : 0) | | 1730 | (ctrl_ul->DTR ? TIOCM_DTR : 0) | |
1729 | (ctrl_dl->DCD ? TIOCM_CAR : 0) | | 1731 | (ctrl_dl->DCD ? TIOCM_CAR : 0) | |
@@ -1849,16 +1851,6 @@ static void ntty_throttle(struct tty_struct *tty) | |||
1849 | spin_unlock_irqrestore(&dc->spin_mutex, flags); | 1851 | spin_unlock_irqrestore(&dc->spin_mutex, flags); |
1850 | } | 1852 | } |
1851 | 1853 | ||
1852 | /* just to discard single character writes */ | ||
1853 | static void ntty_put_char(struct tty_struct *tty, unsigned char c) | ||
1854 | { | ||
1855 | /* | ||
1856 | * card does not react correct when we write single chars | ||
1857 | * to the card, so we discard them | ||
1858 | */ | ||
1859 | DBG2("PUT CHAR Function: %c", c); | ||
1860 | } | ||
1861 | |||
1862 | /* Returns number of chars in buffer, called by tty layer */ | 1854 | /* Returns number of chars in buffer, called by tty layer */ |
1863 | static s32 ntty_chars_in_buffer(struct tty_struct *tty) | 1855 | static s32 ntty_chars_in_buffer(struct tty_struct *tty) |
1864 | { | 1856 | { |
@@ -1892,7 +1884,6 @@ static const struct tty_operations tty_ops = { | |||
1892 | .unthrottle = ntty_unthrottle, | 1884 | .unthrottle = ntty_unthrottle, |
1893 | .throttle = ntty_throttle, | 1885 | .throttle = ntty_throttle, |
1894 | .chars_in_buffer = ntty_chars_in_buffer, | 1886 | .chars_in_buffer = ntty_chars_in_buffer, |
1895 | .put_char = ntty_put_char, | ||
1896 | .tiocmget = ntty_tiocmget, | 1887 | .tiocmget = ntty_tiocmget, |
1897 | .tiocmset = ntty_tiocmset, | 1888 | .tiocmset = ntty_tiocmset, |
1898 | }; | 1889 | }; |