aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/tty_io.c
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2006-09-29 05:00:40 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-29 12:18:16 -0400
commit1266b1e1aed0a4d7d5cb569deca8c31cba34a990 (patch)
tree068b6914c89efd98fb75ff0eb3fa952ec92b56fa /drivers/char/tty_io.c
parent0b4a8a789a328af6aac613734c362cf6aad72201 (diff)
[PATCH] tty: trivial kzalloc opportunity
Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/tty_io.c')
-rw-r--r--drivers/char/tty_io.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index 2a1e95b0f282..18085a20df23 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -160,17 +160,11 @@ static void release_mem(struct tty_struct *tty, int idx);
160 * been initialized in any way but has been zeroed 160 * been initialized in any way but has been zeroed
161 * 161 *
162 * Locking: none 162 * Locking: none
163 * FIXME: use kzalloc
164 */ 163 */
165 164
166static struct tty_struct *alloc_tty_struct(void) 165static struct tty_struct *alloc_tty_struct(void)
167{ 166{
168 struct tty_struct *tty; 167 return kzalloc(sizeof(struct tty_struct), GFP_KERNEL);
169
170 tty = kmalloc(sizeof(struct tty_struct), GFP_KERNEL);
171 if (tty)
172 memset(tty, 0, sizeof(struct tty_struct));
173 return tty;
174} 168}
175 169
176static void tty_buffer_free_all(struct tty_struct *); 170static void tty_buffer_free_all(struct tty_struct *);