diff options
author | Krzysztof Helt <[email protected]> | 2009-06-16 15:34:23 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2009-06-16 19:47:58 -0700 |
commit | 4113819eb360555a91a8291f37bbbe9d26c5b275 (patch) | |
tree | aaf774921257dab5bfc51926f65589abdde7fd1b | |
parent | 100b4a6eefb2ec335a2ae82356dad1b506ded8ed (diff) |
offb: use framebuffer_alloc() to allocate fb_info struct
Use the framebuffer_alloc() function to allocate the fb_info structure so
the structure is correctly initialized after allocation.
Signed-off-by: Krzysztof Helt <[email protected]>
Cc: Geert Uytterhoeven <[email protected]>
Acked-by: Benjamin Herrenschmidt <[email protected]>
Cc: "David S. Miller" <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | drivers/video/offb.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/video/offb.c b/drivers/video/offb.c index e1d9eeb1aeaf..bb915a43dd62 100644 --- a/drivers/video/offb.c +++ b/drivers/video/offb.c @@ -378,7 +378,6 @@ static void __init offb_init_fb(const char *name, const char *full_name, struct fb_fix_screeninfo *fix; struct fb_var_screeninfo *var; struct fb_info *info; - int size; if (!request_mem_region(res_start, res_size, "offb")) return; @@ -393,15 +392,12 @@ static void __init offb_init_fb(const char *name, const char *full_name, return; } - size = sizeof(struct fb_info) + sizeof(u32) * 16; - - info = kmalloc(size, GFP_ATOMIC); + info = framebuffer_alloc(sizeof(u32) * 16, NULL); if (info == 0) { release_mem_region(res_start, res_size); return; } - memset(info, 0, size); fix = &info->fix; var = &info->var; |