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