OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
da9dc13
)
hvc_console: Use kzalloc() instead of kmalloc() + memset()
author
Milton Miller
<miltonm@bga.com>
Thu, 8 Jan 2009 02:14:28 +0000
(
02:14
+0000)
committer
Benjamin Herrenschmidt
<benh@kernel.crashing.org>
Tue, 13 Jan 2009 03:48:02 +0000
(14:48 +1100)
Replace kmalloc() + memset() with kzalloc().
Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
drivers/char/hvc_console.c
patch
|
blob
|
history
diff --git
a/drivers/char/hvc_console.c
b/drivers/char/hvc_console.c
index
0e18fdb
..
09676b4
100644
(file)
--- a/
drivers/char/hvc_console.c
+++ b/
drivers/char/hvc_console.c
@@
-765,13
+765,11
@@
struct hvc_struct __devinit *hvc_alloc(uint32_t vtermno, int data,
return ERR_PTR(err);
}
- hp = k
m
alloc(ALIGN(sizeof(*hp), sizeof(long)) + outbuf_size,
+ hp = k
z
alloc(ALIGN(sizeof(*hp), sizeof(long)) + outbuf_size,
GFP_KERNEL);
if (!hp)
return ERR_PTR(-ENOMEM);
- memset(hp, 0x00, sizeof(*hp));
-
hp->vtermno = vtermno;
hp->data = data;
hp->ops = ops;