summaryrefslogtreecommitdiffstats
path: root/drivers/video/igafb.c
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2007-02-12 09:55:12 +0100
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-12 18:48:43 +0100
commitf5610b9c3a2896fcaa623b92d0f24d83f10bb2c0 (patch)
treef4ff35f5991debf0f892794687abc574cdaacb4f /drivers/video/igafb.c
parent[PATCH] Video: fb, add true ref_count atomicity (diff)
downloadlinux-f5610b9c3a2896fcaa623b92d0f24d83f10bb2c0.tar.xz
linux-f5610b9c3a2896fcaa623b92d0f24d83f10bb2c0.zip
[PATCH] Video: fb, kzalloc changes
Use kzalloc instead of kmalloc + memset(0). Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: James Simmons <jsimmons@infradead.org> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/igafb.c')
-rw-r--r--drivers/video/igafb.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/video/igafb.c b/drivers/video/igafb.c
index 51355c8885aa..90592fb59156 100644
--- a/drivers/video/igafb.c
+++ b/drivers/video/igafb.c
@@ -401,12 +401,11 @@ int __init igafb_init(void)
size = sizeof(struct fb_info) + sizeof(struct iga_par) + sizeof(u32)*16;
- info = kmalloc(size, GFP_ATOMIC);
+ info = kzalloc(size, GFP_ATOMIC);
if (!info) {
printk("igafb_init: can't alloc fb_info\n");
return -ENOMEM;
}
- memset(info, 0, size);
par = (struct iga_par *) (info + 1);
@@ -465,7 +464,7 @@ int __init igafb_init(void)
* one additional region with size == 0.
*/
- par->mmap_map = kmalloc(4 * sizeof(*par->mmap_map), GFP_ATOMIC);
+ par->mmap_map = kzalloc(4 * sizeof(*par->mmap_map), GFP_ATOMIC);
if (!par->mmap_map) {
printk("igafb_init: can't alloc mmap_map\n");
iounmap((void *)par->io_base);
@@ -474,8 +473,6 @@ int __init igafb_init(void)
return -ENOMEM;
}
- memset(par->mmap_map, 0, 4 * sizeof(*par->mmap_map));
-
/*
* Set default vmode and cmode from PROM properties.
*/