diff options
author | Antonino A. Daplas <adaplas@gmail.com> | 2006-07-30 06:04:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-31 16:28:44 -0400 |
commit | 256154fbc31c25a8df4d398232acfa9d4892224c (patch) | |
tree | 278582add1a28766a1f3f4dba2f250cdbb191e0a /drivers/video/fb_notify.c | |
parent | 834a9b8ca7a01c34570be021f88e18884a29f048 (diff) |
[PATCH] fbdev: statically link the framebuffer notification functions
The backlight and lcd subsystems can be notified by the framebuffer layer
of blanking events. However, these subsystems, as a whole, can function
independently from the framebuffer layer. But in order to enable to the
lcd and backlight subsystems, the framebuffer has to be compiled also,
effectively sucking in a huge amount of unneeded code.
To prevent dependency problems, separate out the framebuffer notification
mechanism from the framebuffer layer and permanently link it to the kernel.
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video/fb_notify.c')
-rw-r--r-- | drivers/video/fb_notify.c | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/drivers/video/fb_notify.c b/drivers/video/fb_notify.c new file mode 100644 index 000000000000..8c020389e4fa --- /dev/null +++ b/drivers/video/fb_notify.c | |||
@@ -0,0 +1,46 @@ | |||
1 | /* | ||
2 | * linux/drivers/video/fb_notify.c | ||
3 | * | ||
4 | * Copyright (C) 2006 Antonino Daplas <adaplas@pol.net> | ||
5 | * | ||
6 | * 2001 - Documented with DocBook | ||
7 | * - Brad Douglas <brad@neruo.com> | ||
8 | * | ||
9 | * This file is subject to the terms and conditions of the GNU General Public | ||
10 | * License. See the file COPYING in the main directory of this archive | ||
11 | * for more details. | ||
12 | */ | ||
13 | #include <linux/fb.h> | ||
14 | #include <linux/notifier.h> | ||
15 | |||
16 | static BLOCKING_NOTIFIER_HEAD(fb_notifier_list); | ||
17 | |||
18 | /** | ||
19 | * fb_register_client - register a client notifier | ||
20 | * @nb: notifier block to callback on events | ||
21 | */ | ||
22 | int fb_register_client(struct notifier_block *nb) | ||
23 | { | ||
24 | return blocking_notifier_chain_register(&fb_notifier_list, nb); | ||
25 | } | ||
26 | EXPORT_SYMBOL(fb_register_client); | ||
27 | |||
28 | /** | ||
29 | * fb_unregister_client - unregister a client notifier | ||
30 | * @nb: notifier block to callback on events | ||
31 | */ | ||
32 | int fb_unregister_client(struct notifier_block *nb) | ||
33 | { | ||
34 | return blocking_notifier_chain_unregister(&fb_notifier_list, nb); | ||
35 | } | ||
36 | EXPORT_SYMBOL(fb_unregister_client); | ||
37 | |||
38 | /** | ||
39 | * fb_notifier_call_chain - notify clients of fb_events | ||
40 | * | ||
41 | */ | ||
42 | int fb_notifier_call_chain(unsigned long val, void *v) | ||
43 | { | ||
44 | return blocking_notifier_call_chain(&fb_notifier_list, val, v); | ||
45 | } | ||
46 | EXPORT_SYMBOL_GPL(fb_notifier_call_chain); | ||