diff options
Diffstat (limited to 'drivers/video/fbmem.c')
-rw-r--r-- | drivers/video/fbmem.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index a2102a543ee7..31143afe7c95 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c | |||
@@ -1353,6 +1353,7 @@ register_framebuffer(struct fb_info *fb_info) | |||
1353 | int | 1353 | int |
1354 | unregister_framebuffer(struct fb_info *fb_info) | 1354 | unregister_framebuffer(struct fb_info *fb_info) |
1355 | { | 1355 | { |
1356 | struct fb_event event; | ||
1356 | int i; | 1357 | int i; |
1357 | 1358 | ||
1358 | i = fb_info->node; | 1359 | i = fb_info->node; |
@@ -1360,13 +1361,17 @@ unregister_framebuffer(struct fb_info *fb_info) | |||
1360 | return -EINVAL; | 1361 | return -EINVAL; |
1361 | devfs_remove("fb/%d", i); | 1362 | devfs_remove("fb/%d", i); |
1362 | 1363 | ||
1363 | if (fb_info->pixmap.addr && (fb_info->pixmap.flags & FB_PIXMAP_DEFAULT)) | 1364 | if (fb_info->pixmap.addr && |
1365 | (fb_info->pixmap.flags & FB_PIXMAP_DEFAULT)) | ||
1364 | kfree(fb_info->pixmap.addr); | 1366 | kfree(fb_info->pixmap.addr); |
1365 | fb_destroy_modelist(&fb_info->modelist); | 1367 | fb_destroy_modelist(&fb_info->modelist); |
1366 | registered_fb[i]=NULL; | 1368 | registered_fb[i]=NULL; |
1367 | num_registered_fb--; | 1369 | num_registered_fb--; |
1368 | fb_cleanup_class_device(fb_info); | 1370 | fb_cleanup_class_device(fb_info); |
1369 | class_device_destroy(fb_class, MKDEV(FB_MAJOR, i)); | 1371 | class_device_destroy(fb_class, MKDEV(FB_MAJOR, i)); |
1372 | event.info = fb_info; | ||
1373 | blocking_notifier_call_chain(&fb_notifier_list, | ||
1374 | FB_EVENT_FB_UNREGISTERED, &event); | ||
1370 | return 0; | 1375 | return 0; |
1371 | } | 1376 | } |
1372 | 1377 | ||