diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2006-10-04 13:15:27 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-04 18:55:13 +0400 |
commit | b3218a79aa3d58b975b066c300153a8520f7051c (patch) | |
tree | ecdbadacd84a00682bf047c0cdae1194cad3c38c /drivers/char/epca.c | |
parent | 1d2c8eea698514cfaa53fc991b960791d09508e1 (diff) | |
download | linux-b3218a79aa3d58b975b066c300153a8520f7051c.tar.xz |
[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.c | 17 |
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) ch = card_ptr[crd]; for (count = 0; count < bd->numports; count++, ch++) { /* Begin for each port */ - if (ch) { - if (ch->tty) - tty_hangup(ch->tty); - kfree(ch->tmp_buf); - } + if (ch && ch->tty) + tty_hangup(ch->tty); } /* End for each port */ } /* End for each card */ pci_unregister_driver (&epca_driver); @@ -1635,16 +1632,6 @@ static void post_fep_init(unsigned int crd) init_waitqueue_head(&ch->close_wait); spin_unlock_irqrestore(&epca_lock, flags); - - ch->tmp_buf = kmalloc(ch->txbufsize,GFP_KERNEL); - if (!ch->tmp_buf) { - printk(KERN_ERR "POST FEP INIT : kmalloc failed for port 0x%x\n",i); - release_region((int)bd->port, 4); - while(i-- > 0) - kfree((ch--)->tmp_buf); - return; - } else - memset((void *)ch->tmp_buf,0,ch->txbufsize); } /* End for each port */ printk(KERN_INFO |