diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-08-04 01:00:15 +0200 |
---|---|---|
committer | Live-CD User <linux@linux.site> | 2009-09-19 22:13:10 +0200 |
commit | f0de0e8d3565ee7feba6228d99763d4cea2087a6 (patch) | |
tree | 2fd63db33a1f1e472325a8f4efd9f9b1b87729b0 /drivers/char/ps3flash.c | |
parent | tty: serial/pcmcia: add ID for Advantech card (diff) | |
download | linux-f0de0e8d3565ee7feba6228d99763d4cea2087a6.tar.xz linux-f0de0e8d3565ee7feba6228d99763d4cea2087a6.zip |
tty-ldisc: make /proc/tty/ldiscs use ldisc_ops instead of ldiscs
The /proc/tty/ldiscs file is totally and utterly un-interested in the
"struct tty_ldisc" structures, and only cares about the underlying ldisc
operations.
So don't make it create a dummy 'struct ldisc' only to get a pointer to
the operations, and then destroy it. Instead, we split up the function
'tty_ldisc_try_get()', and create a 'get_ldops()' helper that just looks
up the ldisc operations based on the ldisc number.
That makes the code simpler to read (smaller and more well-defined
helper functions), and allows the /proc functions to avoid creating that
useless dummy only to immediately free it again.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Tested-by: Sergey Senozhatsky <sergey.senozhatsky@mail.by>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/char/ps3flash.c')
0 files changed, 0 insertions, 0 deletions