mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 06:32:08 +00:00
[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>
This commit is contained in:
parent
640e803376
commit
dd3927105b
7 changed files with 27 additions and 23 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue