summaryrefslogtreecommitdiff
path: root/drivers/video/fb_notify.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-08-03 17:20:37 -0400
committerJeff Garzik <jeff@garzik.org>2006-08-03 17:20:37 -0400
commit23946a8a980d13af7b84bcf3ce023e0d166ec83f (patch)
tree193d2959a7b62b48aaf2236447f1378779e55104 /drivers/video/fb_notify.c
parent66e8bb97055ff22a0e5ea89c0a75a35f8738cc96 (diff)
parent2b14c30b46e007a16c665cc86329bf4a1d9ff6ee (diff)
downloadlinux-next-23946a8a980d13af7b84bcf3ce023e0d166ec83f.tar.gz
Merge branch 'upstream-fixes' into upstream
Diffstat (limited to 'drivers/video/fb_notify.c')
-rw-r--r--drivers/video/fb_notify.c46
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 @@
+/*
+ * linux/drivers/video/fb_notify.c
+ *
+ * Copyright (C) 2006 Antonino Daplas <adaplas@pol.net>
+ *
+ * 2001 - Documented with DocBook
+ * - Brad Douglas <brad@neruo.com>
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file COPYING in the main directory of this archive
+ * for more details.
+ */
+#include <linux/fb.h>
+#include <linux/notifier.h>
+
+static BLOCKING_NOTIFIER_HEAD(fb_notifier_list);
+
+/**
+ * fb_register_client - register a client notifier
+ * @nb: notifier block to callback on events
+ */
+int fb_register_client(struct notifier_block *nb)
+{
+ return blocking_notifier_chain_register(&fb_notifier_list, nb);
+}
+EXPORT_SYMBOL(fb_register_client);
+
+/**
+ * fb_unregister_client - unregister a client notifier
+ * @nb: notifier block to callback on events
+ */
+int fb_unregister_client(struct notifier_block *nb)
+{
+ return blocking_notifier_chain_unregister(&fb_notifier_list, nb);
+}
+EXPORT_SYMBOL(fb_unregister_client);
+
+/**
+ * fb_notifier_call_chain - notify clients of fb_events
+ *
+ */
+int fb_notifier_call_chain(unsigned long val, void *v)
+{
+ return blocking_notifier_call_chain(&fb_notifier_list, val, v);
+}
+EXPORT_SYMBOL_GPL(fb_notifier_call_chain);