diff options
author | Milton Miller <miltonm@bga.com> | 2009-01-08 03:14:28 +0100 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-01-13 04:48:02 +0100 |
commit | 2da7582f7cf5ef5e6adcf42537b6b8be06312152 (patch) | |
tree | f09865ae71dc2442e5ba65f44fff843ad92b9b85 /drivers/char/hvc_console.c | |
parent | hvc_console: Do not set low_latency when using interrupts (diff) | |
download | linux-2da7582f7cf5ef5e6adcf42537b6b8be06312152.tar.xz linux-2da7582f7cf5ef5e6adcf42537b6b8be06312152.zip |
hvc_console: Use kzalloc() instead of kmalloc() + memset()
Replace kmalloc() + memset() with kzalloc().
Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers/char/hvc_console.c')
-rw-r--r-- | drivers/char/hvc_console.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c index 0e18fdb9dddb..09676b4e5d89 100644 --- 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 = kmalloc(ALIGN(sizeof(*hp), sizeof(long)) + outbuf_size, + hp = kzalloc(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; |