summaryrefslogtreecommitdiffstats
path: root/drivers/char/serial167.c
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2006-10-04 02:15:27 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-04 07:55:13 -0700
commitb3218a79aa3d58b975b066c300153a8520f7051c (patch)
treeecdbadacd84a00682bf047c0cdae1194cad3c38c /drivers/char/serial167.c
parent1d2c8eea698514cfaa53fc991b960791d09508e1 (diff)
downloadkernel-crypto-b3218a79aa3d58b975b066c300153a8520f7051c.tar.gz
kernel-crypto-b3218a79aa3d58b975b066c300153a8520f7051c.tar.xz
kernel-crypto-b3218a79aa3d58b975b066c300153a8520f7051c.zip
[PATCH] char: kill unneeded memsets
char, another tmp_buf cleanup No need to allocate one page as a side buffer. It's no more used. Clean this (de)allocs of this useless memory pages in char subtree. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/serial167.c')
-rw-r--r--drivers/char/serial167.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/drivers/char/serial167.c b/drivers/char/serial167.c
index b4ea1266b66..48dae5d68da 100644
--- a/drivers/char/serial167.c
+++ b/drivers/char/serial167.c
@@ -119,17 +119,6 @@ struct cyclades_port cy_port[] = {
#define NR_PORTS ARRAY_SIZE(cy_port)
/*
- * tmp_buf is used as a temporary buffer by serial_write. We need to
- * lock it in case the copy_from_user blocks while swapping in a page,
- * and some other program tries to do a serial write at the same time.
- * Since the lock will only come under contention when the system is
- * swapping and available memory is low, it makes sense to share one
- * buffer across all the serial ports, since it significantly saves
- * memory if large numbers of serial ports are open.
- */
-static unsigned char *tmp_buf = 0;
-
-/*
* This is used to look up the divisor speeds and the timeouts
* We're normally limited to 15 distinct baud rates. The extra
* are accessed via settings in info->flags.
@@ -1198,7 +1187,7 @@ cy_write(struct tty_struct * tty,
return 0;
}
- if (!tty || !info->xmit_buf || !tmp_buf){
+ if (!tty || !info->xmit_buf){
return 0;
}
@@ -1983,13 +1972,6 @@ cy_open(struct tty_struct *tty, struct file * filp)
tty->driver_data = info;
info->tty = tty;
- if (!tmp_buf) {
- tmp_buf = (unsigned char *) get_zeroed_page(GFP_KERNEL);
- if (!tmp_buf){
- return -ENOMEM;
- }
- }
-
/*
* Start up serial port
*/