aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/riscom8.c
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2006-10-04 05:15:27 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-04 10:55:13 -0400
commitb3218a79aa3d58b975b066c300153a8520f7051c (patch)
treeecdbadacd84a00682bf047c0cdae1194cad3c38c /drivers/char/riscom8.c
parent1d2c8eea698514cfaa53fc991b960791d09508e1 (diff)
[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.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/char/riscom8.c b/drivers/char/riscom8.c
index 214d850112fd..b0ab3f28cc6a 100644
--- a/drivers/char/riscom8.c
+++ b/drivers/char/riscom8.c
@@ -81,7 +81,6 @@
81 81
82static struct riscom_board * IRQ_to_board[16]; 82static struct riscom_board * IRQ_to_board[16];
83static struct tty_driver *riscom_driver; 83static struct tty_driver *riscom_driver;
84static unsigned char * tmp_buf;
85 84
86static unsigned long baud_table[] = { 85static unsigned long baud_table[] = {
87 0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, 86 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,
1124 1123
1125 bp = port_Board(port); 1124 bp = port_Board(port);
1126 1125
1127 if (!tty || !port->xmit_buf || !tmp_buf) 1126 if (!tty || !port->xmit_buf)
1128 return 0; 1127 return 0;
1129 1128
1130 save_flags(flags); 1129 save_flags(flags);
@@ -1612,11 +1611,6 @@ static inline int rc_init_drivers(void)
1612 if (!riscom_driver) 1611 if (!riscom_driver)
1613 return -ENOMEM; 1612 return -ENOMEM;
1614 1613
1615 if (!(tmp_buf = (unsigned char *) get_zeroed_page(GFP_KERNEL))) {
1616 printk(KERN_ERR "rc: Couldn't get free page.\n");
1617 put_tty_driver(riscom_driver);
1618 return 1;
1619 }
1620 memset(IRQ_to_board, 0, sizeof(IRQ_to_board)); 1614 memset(IRQ_to_board, 0, sizeof(IRQ_to_board));
1621 riscom_driver->owner = THIS_MODULE; 1615 riscom_driver->owner = THIS_MODULE;
1622 riscom_driver->name = "ttyL"; 1616 riscom_driver->name = "ttyL";
@@ -1629,7 +1623,6 @@ static inline int rc_init_drivers(void)
1629 riscom_driver->flags = TTY_DRIVER_REAL_RAW; 1623 riscom_driver->flags = TTY_DRIVER_REAL_RAW;
1630 tty_set_operations(riscom_driver, &riscom_ops); 1624 tty_set_operations(riscom_driver, &riscom_ops);
1631 if ((error = tty_register_driver(riscom_driver))) { 1625 if ((error = tty_register_driver(riscom_driver))) {
1632 free_page((unsigned long)tmp_buf);
1633 put_tty_driver(riscom_driver); 1626 put_tty_driver(riscom_driver);
1634 printk(KERN_ERR "rc: Couldn't register RISCom/8 driver, " 1627 printk(KERN_ERR "rc: Couldn't register RISCom/8 driver, "
1635 "error = %d\n", 1628 "error = %d\n",
@@ -1657,7 +1650,6 @@ static void rc_release_drivers(void)
1657 1650
1658 save_flags(flags); 1651 save_flags(flags);
1659 cli(); 1652 cli();
1660 free_page((unsigned long)tmp_buf);
1661 tty_unregister_driver(riscom_driver); 1653 tty_unregister_driver(riscom_driver);
1662 put_tty_driver(riscom_driver); 1654 put_tty_driver(riscom_driver);
1663 restore_flags(flags); 1655 restore_flags(flags);