aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/tty.h
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2012-10-18 16:26:42 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-22 19:53:01 -0400
commitbddc7152f68bc1e0ee1f55a8055e33531f384101 (patch)
tree2d34628864104d0913d18cccc7eee51f730fdea9 /include/linux/tty.h
parentba2e68ac6157004ee4922fb39ebd9459bbae883e (diff)
TTY: move ldisc data from tty_struct: locks
atomic_write_lock is not n_tty specific, so move it up in the tty_struct. And since these are the last ones to move, remove also the comment saying there are some ldisc' members. There are none now. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/tty.h')
-rw-r--r--include/linux/tty.h11
1 files changed, 1 insertions, 10 deletions
diff --git a/include/linux/tty.h b/include/linux/tty.h
index 226cf20e015..08787ece3fd 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -235,6 +235,7 @@ struct tty_struct {
235 struct mutex ldisc_mutex; 235 struct mutex ldisc_mutex;
236 struct tty_ldisc *ldisc; 236 struct tty_ldisc *ldisc;
237 237
238 struct mutex atomic_write_lock;
238 struct mutex legacy_mutex; 239 struct mutex legacy_mutex;
239 struct mutex termios_mutex; 240 struct mutex termios_mutex;
240 spinlock_t ctrl_lock; 241 spinlock_t ctrl_lock;
@@ -265,20 +266,10 @@ struct tty_struct {
265 266
266#define N_TTY_BUF_SIZE 4096 267#define N_TTY_BUF_SIZE 4096
267 268
268 /*
269 * The following is data for the N_TTY line discipline. For
270 * historical reasons, this is included in the tty structure.
271 * Mostly locked by the BKL.
272 */
273 unsigned char closing:1; 269 unsigned char closing:1;
274 unsigned short minimum_to_wake; 270 unsigned short minimum_to_wake;
275 struct mutex atomic_read_lock;
276 struct mutex atomic_write_lock;
277 struct mutex output_lock;
278 struct mutex echo_lock;
279 unsigned char *write_buf; 271 unsigned char *write_buf;
280 int write_cnt; 272 int write_cnt;
281 spinlock_t read_lock;
282 /* If the tty has a pending do_SAK, queue it here - akpm */ 273 /* If the tty has a pending do_SAK, queue it here - akpm */
283 struct work_struct SAK_work; 274 struct work_struct SAK_work;
284 struct tty_port *port; 275 struct tty_port *port;