summaryrefslogtreecommitdiffstats
path: root/kernel/workqueue.c
diff options
context:
space:
mode:
authorPekka J Enberg2005-09-07 00:18:31 +0200
committerLinus Torvalds2005-09-08 01:57:45 +0200
commitdd3927105b6f65afb7dac17682172cdfb86d3f00 (patch)
tree5cf282aff500cad23b9d7e13dc19b2b2d31e1ce6 /kernel/workqueue.c
parent[PATCH] fix: dmi_check_system (diff)
downloadkernel-qcow2-linux-dd3927105b6f65afb7dac17682172cdfb86d3f00.tar.gz
kernel-qcow2-linux-dd3927105b6f65afb7dac17682172cdfb86d3f00.tar.xz
kernel-qcow2-linux-dd3927105b6f65afb7dac17682172cdfb86d3f00.zip
[PATCH] introduce and use kzalloc
This patch introduces a kzalloc wrapper and converts kernel/ to use it. It saves a little program text. Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/workqueue.c')
-rw-r--r--kernel/workqueue.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index a3de837a8ddd..91bacb13a7e2 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -308,10 +308,9 @@ struct workqueue_struct *__create_workqueue(const char *name,
struct workqueue_struct *wq;
struct task_struct *p;
- wq = kmalloc(sizeof(*wq), GFP_KERNEL);
+ wq = kzalloc(sizeof(*wq), GFP_KERNEL);
if (!wq)
return NULL;
- memset(wq, 0, sizeof(*wq));
wq->name = name;
/* We don't need the distraction of CPUs appearing and vanishing. */