diff options
Diffstat (limited to 'drivers/video/offb.c')
-rw-r--r-- | drivers/video/offb.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/video/offb.c b/drivers/video/offb.c index 4d8c54c23dd7..b043ac83c412 100644 --- a/drivers/video/offb.c +++ b/drivers/video/offb.c | |||
@@ -282,8 +282,17 @@ static int offb_set_par(struct fb_info *info) | |||
282 | return 0; | 282 | return 0; |
283 | } | 283 | } |
284 | 284 | ||
285 | static void offb_destroy(struct fb_info *info) | ||
286 | { | ||
287 | if (info->screen_base) | ||
288 | iounmap(info->screen_base); | ||
289 | release_mem_region(info->aperture_base, info->aperture_size); | ||
290 | framebuffer_release(info); | ||
291 | } | ||
292 | |||
285 | static struct fb_ops offb_ops = { | 293 | static struct fb_ops offb_ops = { |
286 | .owner = THIS_MODULE, | 294 | .owner = THIS_MODULE, |
295 | .fb_destroy = offb_destroy, | ||
287 | .fb_setcolreg = offb_setcolreg, | 296 | .fb_setcolreg = offb_setcolreg, |
288 | .fb_set_par = offb_set_par, | 297 | .fb_set_par = offb_set_par, |
289 | .fb_blank = offb_blank, | 298 | .fb_blank = offb_blank, |
@@ -482,10 +491,14 @@ static void __init offb_init_fb(const char *name, const char *full_name, | |||
482 | var->sync = 0; | 491 | var->sync = 0; |
483 | var->vmode = FB_VMODE_NONINTERLACED; | 492 | var->vmode = FB_VMODE_NONINTERLACED; |
484 | 493 | ||
494 | /* set offb aperture size for generic probing */ | ||
495 | info->aperture_base = address; | ||
496 | info->aperture_size = fix->smem_len; | ||
497 | |||
485 | info->fbops = &offb_ops; | 498 | info->fbops = &offb_ops; |
486 | info->screen_base = ioremap(address, fix->smem_len); | 499 | info->screen_base = ioremap(address, fix->smem_len); |
487 | info->pseudo_palette = (void *) (info + 1); | 500 | info->pseudo_palette = (void *) (info + 1); |
488 | info->flags = FBINFO_DEFAULT | foreign_endian; | 501 | info->flags = FBINFO_DEFAULT | FBINFO_MISC_FIRMWARE | foreign_endian; |
489 | 502 | ||
490 | fb_alloc_cmap(&info->cmap, 256, 0); | 503 | fb_alloc_cmap(&info->cmap, 256, 0); |
491 | 504 | ||