summaryrefslogtreecommitdiffstats
path: root/drivers/char/n_tty.c
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2009-06-11 13:04:27 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-11 08:51:02 -0700
commitc481c707fe4b07783d9a2499a9bbbb94497e9b18 (patch)
tree27f4d137c4e3896733b5001c14feeb049ae7cc4d /drivers/char/n_tty.c
parentaba6593bf77371e71331ba76dacc98b47760cba3 (diff)
downloadop-kernel-dev-c481c707fe4b07783d9a2499a9bbbb94497e9b18.zip
op-kernel-dev-c481c707fe4b07783d9a2499a9bbbb94497e9b18.tar.gz
tty: remove buffer special casing
Long long ago a 4K kmalloc allocated two pages so the tty layer used the page allocator, except on some machines where the page size was huge. This was removed from the core tty layer with the tty buffer re-implementation but not from tty_audit or the n_tty ldisc. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/n_tty.c')
-rw-r--r--drivers/char/n_tty.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/char/n_tty.c b/drivers/char/n_tty.c
index f6f0e4e..b4b12b4 100644
--- a/drivers/char/n_tty.c
+++ b/drivers/char/n_tty.c
@@ -76,19 +76,12 @@
static inline unsigned char *alloc_buf(void)
{
gfp_t prio = in_interrupt() ? GFP_ATOMIC : GFP_KERNEL;
-
- if (PAGE_SIZE != N_TTY_BUF_SIZE)
- return kmalloc(N_TTY_BUF_SIZE, prio);
- else
- return (unsigned char *)__get_free_page(prio);
+ return kmalloc(N_TTY_BUF_SIZE, prio);
}
static inline void free_buf(unsigned char *buf)
{
- if (PAGE_SIZE != N_TTY_BUF_SIZE)
- kfree(buf);
- else
- free_page((unsigned long) buf);
+ kfree(buf);
}
static inline int tty_put_user(struct tty_struct *tty, unsigned char x,
OpenPOWER on IntegriCloud