summaryrefslogtreecommitdiff
path: root/drivers/video/offb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/offb.c')
-rw-r--r--drivers/video/offb.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/video/offb.c b/drivers/video/offb.c
index e1d9eeb1aeaf..4d8c54c23dd7 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;
@@ -497,7 +493,7 @@ static void __init offb_init_fb(const char *name, const char *full_name,
iounmap(par->cmap_adr);
par->cmap_adr = NULL;
iounmap(info->screen_base);
- kfree(info);
+ framebuffer_release(info);
release_mem_region(res_start, res_size);
return;
}