diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c index b5e85f6c1c26..3140eac2417d 100644 --- a/drivers/video/fbdev/core/fbmem.c +++ b/drivers/video/fbdev/core/fbmem.c @@ -70,6 +70,8 @@ static void put_fb_info(struct fb_info *fb_info) { if (!atomic_dec_and_test(&fb_info->count)) return; + + printk("Destroy %s framebuffer\n", fb_info->fix.id); if (fb_info->fbops->fb_destroy) fb_info->fbops->fb_destroy(fb_info); } @@ -1484,6 +1486,7 @@ __releases(&info->lock) struct fb_info * const info = file->private_data; mutex_lock(&info->lock); + printk("Release %s framebuffer\n", info->fix.id); if (info->fbops->fb_release) info->fbops->fb_release(info,1); module_put(info->fbops->owner); @@ -1693,10 +1696,13 @@ static int do_unregister_framebuffer(struct fb_info *fb_info) int i, ret = 0; i = fb_info->node; - if (i < 0 || i >= FB_MAX || registered_fb[i] != fb_info) + if (i < 0 || i >= FB_MAX || registered_fb[i] != fb_info) { + printk(KERN_ERR "%s framebuffer invalid index: %d\n", fb_info->fix.id, fb_info->node); return -EINVAL; + } console_lock(); + printk("Unregistering %s framebuffer\n", fb_info->fix.id); if (!lock_fb_info(fb_info)) { console_unlock(); return -ENODEV; @@ -1735,9 +1741,12 @@ int unlink_framebuffer(struct fb_info *fb_info) int i; i = fb_info->node; - if (i < 0 || i >= FB_MAX || registered_fb[i] != fb_info) + if (i < 0 || i >= FB_MAX || registered_fb[i] != fb_info) { + printk(KERN_ERR "%s framebuffer invalid index: %d\n", fb_info->fix.id, fb_info->node); return -EINVAL; + } + printk("Unlinking %s framebuffer\n", fb_info->fix.id); if (fb_info->dev) { device_destroy(fb_class, MKDEV(FB_MAJOR, i)); fb_info->dev = NULL; diff --git a/drivers/video/fbdev/efifb.c b/drivers/video/fbdev/efifb.c index ae9618ff6735..528812407464 100644 --- a/drivers/video/fbdev/efifb.c +++ b/drivers/video/fbdev/efifb.c @@ -237,7 +237,7 @@ static int efifb_probe(struct platform_device *dev) efifb_fix.smem_start); } - info = framebuffer_alloc(sizeof(u32) * 16, &dev->dev); + info = framebuffer_alloc(sizeof(info->pseudo_palette), &dev->dev); if (!info) { printk(KERN_ERR "efifb: cannot allocate framebuffer\n"); err = -ENOMEM;