diff options
author | Pekka J Enberg <penberg@cs.Helsinki.FI> | 2005-09-06 15:18:31 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-07 16:57:45 -0700 |
commit | dd3927105b6f65afb7dac17682172cdfb86d3f00 (patch) | |
tree | 5cf282aff500cad23b9d7e13dc19b2b2d31e1ce6 /kernel/resource.c | |
parent | 640e803376b9c4072f69fec42e304c974a631298 (diff) | |
download | kernel_samsung_tuna-dd3927105b6f65afb7dac17682172cdfb86d3f00.zip kernel_samsung_tuna-dd3927105b6f65afb7dac17682172cdfb86d3f00.tar.gz kernel_samsung_tuna-dd3927105b6f65afb7dac17682172cdfb86d3f00.tar.bz2 |
[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/resource.c')
-rw-r--r-- | kernel/resource.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/resource.c b/kernel/resource.c index 26967e0..92285d8 100644 --- a/kernel/resource.c +++ b/kernel/resource.c @@ -430,10 +430,9 @@ EXPORT_SYMBOL(adjust_resource); */ struct resource * __request_region(struct resource *parent, unsigned long start, unsigned long n, const char *name) { - struct resource *res = kmalloc(sizeof(*res), GFP_KERNEL); + struct resource *res = kzalloc(sizeof(*res), GFP_KERNEL); if (res) { - memset(res, 0, sizeof(*res)); res->name = name; res->start = start; res->end = start + n - 1; |