blob: 74c2da5288848a99a410958c6bca1a7922d3dbd0 [file] [log] [blame]
Antonino A. Daplas256154f2006-07-30 03:04:17 -07001/*
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>
Paul Gortmakera8a35932011-07-10 13:20:26 -040015#include <linux/export.h>
Antonino A. Daplas256154f2006-07-30 03:04:17 -070016
17static BLOCKING_NOTIFIER_HEAD(fb_notifier_list);
18
19/**
20 * fb_register_client - register a client notifier
21 * @nb: notifier block to callback on events
22 */
23int fb_register_client(struct notifier_block *nb)
24{
25 return blocking_notifier_chain_register(&fb_notifier_list, nb);
26}
27EXPORT_SYMBOL(fb_register_client);
28
29/**
30 * fb_unregister_client - unregister a client notifier
31 * @nb: notifier block to callback on events
32 */
33int fb_unregister_client(struct notifier_block *nb)
34{
35 return blocking_notifier_chain_unregister(&fb_notifier_list, nb);
36}
37EXPORT_SYMBOL(fb_unregister_client);
38
39/**
40 * fb_notifier_call_chain - notify clients of fb_events
41 *
42 */
43int fb_notifier_call_chain(unsigned long val, void *v)
44{
45 return blocking_notifier_call_chain(&fb_notifier_list, val, v);
46}
47EXPORT_SYMBOL_GPL(fb_notifier_call_chain);