fb_notify.c 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. static BLOCKING_NOTIFIER_HEAD(fb_notifier_list);
  16. /**
  17. * fb_register_client - register a client notifier
  18. * @nb: notifier block to callback on events
  19. */
  20. int fb_register_client(struct notifier_block *nb)
  21. {
  22. return blocking_notifier_chain_register(&fb_notifier_list, nb);
  23. }
  24. EXPORT_SYMBOL(fb_register_client);
  25. /**
  26. * fb_unregister_client - unregister a client notifier
  27. * @nb: notifier block to callback on events
  28. */
  29. int fb_unregister_client(struct notifier_block *nb)
  30. {
  31. return blocking_notifier_chain_unregister(&fb_notifier_list, nb);
  32. }
  33. EXPORT_SYMBOL(fb_unregister_client);
  34. /**
  35. * fb_notifier_call_chain - notify clients of fb_events
  36. *
  37. */
  38. int fb_notifier_call_chain(unsigned long val, void *v)
  39. {
  40. return blocking_notifier_call_chain(&fb_notifier_list, val, v);
  41. }
  42. EXPORT_SYMBOL_GPL(fb_notifier_call_chain);