aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/epca.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/epca.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/epca.c')
-rw-r--r--drivers/char/epca.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/drivers/char/epca.c b/drivers/char/epca.c
index 3baa2ab8cbd4..c3f95583a120 100644
--- a/drivers/char/epca.c
+++ b/drivers/char/epca.c
@@ -1113,11 +1113,8 @@ static void __exit epca_module_exit(void)
1113 ch = card_ptr[crd]; 1113 ch = card_ptr[crd];
1114 for (count = 0; count < bd->numports; count++, ch++) 1114 for (count = 0; count < bd->numports; count++, ch++)
1115 { /* Begin for each port */ 1115 { /* Begin for each port */
1116 if (ch) { 1116 if (ch && ch->tty)
1117 if (ch->tty) 1117 tty_hangup(ch->tty);
1118 tty_hangup(ch->tty);
1119 kfree(ch->tmp_buf);
1120 }
1121 } /* End for each port */ 1118 } /* End for each port */
1122 } /* End for each card */ 1119 } /* End for each card */
1123 pci_unregister_driver (&epca_driver); 1120 pci_unregister_driver (&epca_driver);
@@ -1635,16 +1632,6 @@ static void post_fep_init(unsigned int crd)
1635 init_waitqueue_head(&ch->close_wait); 1632 init_waitqueue_head(&ch->close_wait);
1636 1633
1637 spin_unlock_irqrestore(&epca_lock, flags); 1634 spin_unlock_irqrestore(&epca_lock, flags);
1638
1639 ch->tmp_buf = kmalloc(ch->txbufsize,GFP_KERNEL);
1640 if (!ch->tmp_buf) {
1641 printk(KERN_ERR "POST FEP INIT : kmalloc failed for port 0x%x\n",i);
1642 release_region((int)bd->port, 4);
1643 while(i-- > 0)
1644 kfree((ch--)->tmp_buf);
1645 return;
1646 } else
1647 memset((void *)ch->tmp_buf,0,ch->txbufsize);
1648 } /* End for each port */ 1635 } /* End for each port */
1649 1636
1650 printk(KERN_INFO 1637 printk(KERN_INFO