From b3218a79aa3d58b975b066c300153a8520f7051c Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Wed, 4 Oct 2006 02:15:27 -0700 Subject: [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 Acked-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/char/epca.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'drivers/char/epca.c') diff --git a/drivers/char/epca.c b/drivers/char/epca.c index 3baa2ab8cbd..c3f95583a12 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 -- cgit v1.2.3