diff options
| author | Jiri Kosina <jkosina@suse.cz> | 2010-05-03 15:25:35 +0200 |
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.cz> | 2010-05-03 15:25:35 +0200 |
| commit | d6d53cbc6b10d28646fb6184d1069f336ec76dc4 (patch) | |
| tree | 1c844b3ce8bd430becbbb74875898b08d9f89bb5 /include/linux/tty.h | |
| parent | 0b5adf92ec793c665b0de63ac146d190a921c391 (diff) | |
| parent | 6a740aa4f47b9f29bad5292cf51f008f3edad9b1 (diff) | |
Merge branch 'hid-suspend' into picolcd
Diffstat (limited to 'include/linux/tty.h')
| -rw-r--r-- | include/linux/tty.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/include/linux/tty.h b/include/linux/tty.h index 568369a86306..4409967db0c4 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h @@ -70,12 +70,13 @@ struct tty_buffer { /* * We default to dicing tty buffer allocations to this many characters - * in order to avoid multiple page allocations. We assume tty_buffer itself - * is under 256 bytes. See tty_buffer_find for the allocation logic this - * must match + * in order to avoid multiple page allocations. We know the size of + * tty_buffer itself but it must also be taken into account that the + * the buffer is 256 byte aligned. See tty_buffer_find for the allocation + * logic this must match */ -#define TTY_BUFFER_PAGE ((PAGE_SIZE - 256) / 2) +#define TTY_BUFFER_PAGE (((PAGE_SIZE - sizeof(struct tty_buffer)) / 2) & ~0xFF) struct tty_bufhead { @@ -223,6 +224,7 @@ struct tty_port { wait_queue_head_t close_wait; /* Close waiters */ wait_queue_head_t delta_msr_wait; /* Modem status change */ unsigned long flags; /* TTY flags ASY_*/ + unsigned char console:1; /* port is a console */ struct mutex mutex; /* Locking */ struct mutex buf_mutex; /* Buffer alloc lock */ unsigned char *xmit_buf; /* Optional buffer */ |
