diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2006-10-04 02:15:27 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-04 07:55:13 -0700 |
commit | b3218a79aa3d58b975b066c300153a8520f7051c (patch) | |
tree | ecdbadacd84a00682bf047c0cdae1194cad3c38c /drivers/char/riscom8.c | |
parent | 1d2c8eea698514cfaa53fc991b960791d09508e1 (diff) | |
download | op-kernel-dev-b3218a79aa3d58b975b066c300153a8520f7051c.zip op-kernel-dev-b3218a79aa3d58b975b066c300153a8520f7051c.tar.gz |
[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/riscom8.c')
-rw-r--r-- | drivers/char/riscom8.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/char/riscom8.c b/drivers/char/riscom8.c index 214d850..b0ab3f2 100644 --- a/drivers/char/riscom8.c +++ b/drivers/char/riscom8.c @@ -81,7 +81,6 @@ static struct riscom_board * IRQ_to_board[16]; static struct tty_driver *riscom_driver; -static unsigned char * tmp_buf; static unsigned long baud_table[] = { 0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, @@ -1124,7 +1123,7 @@ static int rc_write(struct tty_struct * tty, bp = port_Board(port); - if (!tty || !port->xmit_buf || !tmp_buf) + if (!tty || !port->xmit_buf) return 0; save_flags(flags); @@ -1612,11 +1611,6 @@ static inline int rc_init_drivers(void) if (!riscom_driver) return -ENOMEM; - if (!(tmp_buf = (unsigned char *) get_zeroed_page(GFP_KERNEL))) { - printk(KERN_ERR "rc: Couldn't get free page.\n"); - put_tty_driver(riscom_driver); - return 1; - } memset(IRQ_to_board, 0, sizeof(IRQ_to_board)); riscom_driver->owner = THIS_MODULE; riscom_driver->name = "ttyL"; @@ -1629,7 +1623,6 @@ static inline int rc_init_drivers(void) riscom_driver->flags = TTY_DRIVER_REAL_RAW; tty_set_operations(riscom_driver, &riscom_ops); if ((error = tty_register_driver(riscom_driver))) { - free_page((unsigned long)tmp_buf); put_tty_driver(riscom_driver); printk(KERN_ERR "rc: Couldn't register RISCom/8 driver, " "error = %d\n", @@ -1657,7 +1650,6 @@ static void rc_release_drivers(void) save_flags(flags); cli(); - free_page((unsigned long)tmp_buf); tty_unregister_driver(riscom_driver); put_tty_driver(riscom_driver); restore_flags(flags); |