diff options
Diffstat (limited to 'drivers/video/fbmem.c')
-rw-r--r-- | drivers/video/fbmem.c | 56 |
1 files changed, 12 insertions, 44 deletions
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index 33034f81114d..17961e3ecaa0 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
24 | #include <linux/mm.h> | 24 | #include <linux/mm.h> |
25 | #include <linux/mman.h> | 25 | #include <linux/mman.h> |
26 | #include <linux/tty.h> | 26 | #include <linux/vt.h> |
27 | #include <linux/init.h> | 27 | #include <linux/init.h> |
28 | #include <linux/linux_logo.h> | 28 | #include <linux/linux_logo.h> |
29 | #include <linux/proc_fs.h> | 29 | #include <linux/proc_fs.h> |
@@ -52,7 +52,6 @@ | |||
52 | 52 | ||
53 | #define FBPIXMAPSIZE (1024 * 8) | 53 | #define FBPIXMAPSIZE (1024 * 8) |
54 | 54 | ||
55 | static BLOCKING_NOTIFIER_HEAD(fb_notifier_list); | ||
56 | struct fb_info *registered_fb[FB_MAX]; | 55 | struct fb_info *registered_fb[FB_MAX]; |
57 | int num_registered_fb; | 56 | int num_registered_fb; |
58 | 57 | ||
@@ -791,8 +790,7 @@ fb_set_var(struct fb_info *info, struct fb_var_screeninfo *var) | |||
791 | 790 | ||
792 | event.info = info; | 791 | event.info = info; |
793 | event.data = &mode1; | 792 | event.data = &mode1; |
794 | ret = blocking_notifier_call_chain(&fb_notifier_list, | 793 | ret = fb_notifier_call_chain(FB_EVENT_MODE_DELETE, &event); |
795 | FB_EVENT_MODE_DELETE, &event); | ||
796 | } | 794 | } |
797 | 795 | ||
798 | if (!ret) | 796 | if (!ret) |
@@ -837,8 +835,7 @@ fb_set_var(struct fb_info *info, struct fb_var_screeninfo *var) | |||
837 | 835 | ||
838 | info->flags &= ~FBINFO_MISC_USEREVENT; | 836 | info->flags &= ~FBINFO_MISC_USEREVENT; |
839 | event.info = info; | 837 | event.info = info; |
840 | blocking_notifier_call_chain(&fb_notifier_list, | 838 | fb_notifier_call_chain(evnt, &event); |
841 | evnt, &event); | ||
842 | } | 839 | } |
843 | } | 840 | } |
844 | } | 841 | } |
@@ -861,8 +858,7 @@ fb_blank(struct fb_info *info, int blank) | |||
861 | 858 | ||
862 | event.info = info; | 859 | event.info = info; |
863 | event.data = ␣ | 860 | event.data = ␣ |
864 | blocking_notifier_call_chain(&fb_notifier_list, | 861 | fb_notifier_call_chain(FB_EVENT_BLANK, &event); |
865 | FB_EVENT_BLANK, &event); | ||
866 | } | 862 | } |
867 | 863 | ||
868 | return ret; | 864 | return ret; |
@@ -933,8 +929,7 @@ fb_ioctl(struct inode *inode, struct file *file, unsigned int cmd, | |||
933 | con2fb.framebuffer = -1; | 929 | con2fb.framebuffer = -1; |
934 | event.info = info; | 930 | event.info = info; |
935 | event.data = &con2fb; | 931 | event.data = &con2fb; |
936 | blocking_notifier_call_chain(&fb_notifier_list, | 932 | fb_notifier_call_chain(FB_EVENT_GET_CONSOLE_MAP, &event); |
937 | FB_EVENT_GET_CONSOLE_MAP, &event); | ||
938 | return copy_to_user(argp, &con2fb, | 933 | return copy_to_user(argp, &con2fb, |
939 | sizeof(con2fb)) ? -EFAULT : 0; | 934 | sizeof(con2fb)) ? -EFAULT : 0; |
940 | case FBIOPUT_CON2FBMAP: | 935 | case FBIOPUT_CON2FBMAP: |
@@ -952,9 +947,8 @@ fb_ioctl(struct inode *inode, struct file *file, unsigned int cmd, | |||
952 | return -EINVAL; | 947 | return -EINVAL; |
953 | event.info = info; | 948 | event.info = info; |
954 | event.data = &con2fb; | 949 | event.data = &con2fb; |
955 | return blocking_notifier_call_chain(&fb_notifier_list, | 950 | return fb_notifier_call_chain(FB_EVENT_SET_CONSOLE_MAP, |
956 | FB_EVENT_SET_CONSOLE_MAP, | 951 | &event); |
957 | &event); | ||
958 | case FBIOBLANK: | 952 | case FBIOBLANK: |
959 | acquire_console_sem(); | 953 | acquire_console_sem(); |
960 | info->flags |= FBINFO_MISC_USEREVENT; | 954 | info->flags |= FBINFO_MISC_USEREVENT; |
@@ -1330,8 +1324,7 @@ register_framebuffer(struct fb_info *fb_info) | |||
1330 | registered_fb[i] = fb_info; | 1324 | registered_fb[i] = fb_info; |
1331 | 1325 | ||
1332 | event.info = fb_info; | 1326 | event.info = fb_info; |
1333 | blocking_notifier_call_chain(&fb_notifier_list, | 1327 | fb_notifier_call_chain(FB_EVENT_FB_REGISTERED, &event); |
1334 | FB_EVENT_FB_REGISTERED, &event); | ||
1335 | return 0; | 1328 | return 0; |
1336 | } | 1329 | } |
1337 | 1330 | ||
@@ -1365,30 +1358,11 @@ unregister_framebuffer(struct fb_info *fb_info) | |||
1365 | fb_cleanup_class_device(fb_info); | 1358 | fb_cleanup_class_device(fb_info); |
1366 | class_device_destroy(fb_class, MKDEV(FB_MAJOR, i)); | 1359 | class_device_destroy(fb_class, MKDEV(FB_MAJOR, i)); |
1367 | event.info = fb_info; | 1360 | event.info = fb_info; |
1368 | blocking_notifier_call_chain(&fb_notifier_list, | 1361 | fb_notifier_call_chain(FB_EVENT_FB_UNREGISTERED, &event); |
1369 | FB_EVENT_FB_UNREGISTERED, &event); | ||
1370 | return 0; | 1362 | return 0; |
1371 | } | 1363 | } |
1372 | 1364 | ||
1373 | /** | 1365 | /** |
1374 | * fb_register_client - register a client notifier | ||
1375 | * @nb: notifier block to callback on events | ||
1376 | */ | ||
1377 | int fb_register_client(struct notifier_block *nb) | ||
1378 | { | ||
1379 | return blocking_notifier_chain_register(&fb_notifier_list, nb); | ||
1380 | } | ||
1381 | |||
1382 | /** | ||
1383 | * fb_unregister_client - unregister a client notifier | ||
1384 | * @nb: notifier block to callback on events | ||
1385 | */ | ||
1386 | int fb_unregister_client(struct notifier_block *nb) | ||
1387 | { | ||
1388 | return blocking_notifier_chain_unregister(&fb_notifier_list, nb); | ||
1389 | } | ||
1390 | |||
1391 | /** | ||
1392 | * fb_set_suspend - low level driver signals suspend | 1366 | * fb_set_suspend - low level driver signals suspend |
1393 | * @info: framebuffer affected | 1367 | * @info: framebuffer affected |
1394 | * @state: 0 = resuming, !=0 = suspending | 1368 | * @state: 0 = resuming, !=0 = suspending |
@@ -1403,13 +1377,11 @@ void fb_set_suspend(struct fb_info *info, int state) | |||
1403 | 1377 | ||
1404 | event.info = info; | 1378 | event.info = info; |
1405 | if (state) { | 1379 | if (state) { |
1406 | blocking_notifier_call_chain(&fb_notifier_list, | 1380 | fb_notifier_call_chain(FB_EVENT_SUSPEND, &event); |
1407 | FB_EVENT_SUSPEND, &event); | ||
1408 | info->state = FBINFO_STATE_SUSPENDED; | 1381 | info->state = FBINFO_STATE_SUSPENDED; |
1409 | } else { | 1382 | } else { |
1410 | info->state = FBINFO_STATE_RUNNING; | 1383 | info->state = FBINFO_STATE_RUNNING; |
1411 | blocking_notifier_call_chain(&fb_notifier_list, | 1384 | fb_notifier_call_chain(FB_EVENT_RESUME, &event); |
1412 | FB_EVENT_RESUME, &event); | ||
1413 | } | 1385 | } |
1414 | } | 1386 | } |
1415 | 1387 | ||
@@ -1480,9 +1452,7 @@ int fb_new_modelist(struct fb_info *info) | |||
1480 | 1452 | ||
1481 | if (!list_empty(&info->modelist)) { | 1453 | if (!list_empty(&info->modelist)) { |
1482 | event.info = info; | 1454 | event.info = info; |
1483 | err = blocking_notifier_call_chain(&fb_notifier_list, | 1455 | err = fb_notifier_call_chain(FB_EVENT_NEW_MODELIST, &event); |
1484 | FB_EVENT_NEW_MODELIST, | ||
1485 | &event); | ||
1486 | } | 1456 | } |
1487 | 1457 | ||
1488 | return err; | 1458 | return err; |
@@ -1594,8 +1564,6 @@ EXPORT_SYMBOL(fb_blank); | |||
1594 | EXPORT_SYMBOL(fb_pan_display); | 1564 | EXPORT_SYMBOL(fb_pan_display); |
1595 | EXPORT_SYMBOL(fb_get_buffer_offset); | 1565 | EXPORT_SYMBOL(fb_get_buffer_offset); |
1596 | EXPORT_SYMBOL(fb_set_suspend); | 1566 | EXPORT_SYMBOL(fb_set_suspend); |
1597 | EXPORT_SYMBOL(fb_register_client); | ||
1598 | EXPORT_SYMBOL(fb_unregister_client); | ||
1599 | EXPORT_SYMBOL(fb_get_options); | 1567 | EXPORT_SYMBOL(fb_get_options); |
1600 | 1568 | ||
1601 | MODULE_LICENSE("GPL"); | 1569 | MODULE_LICENSE("GPL"); |