aml_notify.c 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * linux/drivers/video/apollo/aout_notify.c
  3. *
  4. * Copyright (C) 2009 amlogic
  5. *
  6. * This file is subject to the terms and conditions of the GNU General Public
  7. * License. See the file COPYING in the main directory of this archive
  8. * for more details.
  9. */
  10. #include <linux/module.h>
  11. static BLOCKING_NOTIFIER_HEAD(aout_notifier_list);
  12. /**
  13. * aout_register_client - register a client notifier
  14. * @nb: notifier block to callback on events
  15. */
  16. int aout_register_client(struct notifier_block *nb)
  17. {
  18. return blocking_notifier_chain_register(&aout_notifier_list, nb);
  19. }
  20. EXPORT_SYMBOL(aout_register_client);
  21. /**
  22. * aout_unregister_client - unregister a client notifier
  23. * @nb: notifier block to callback on events
  24. */
  25. int aout_unregister_client(struct notifier_block *nb)
  26. {
  27. return blocking_notifier_chain_unregister(&aout_notifier_list, nb);
  28. }
  29. EXPORT_SYMBOL(aout_unregister_client);
  30. /**
  31. * aout_notifier_call_chain - notify clients of fb_events
  32. *
  33. */
  34. int aout_notifier_call_chain(unsigned long val, void *v)
  35. {
  36. return blocking_notifier_call_chain(&aout_notifier_list, val, v);
  37. }
  38. EXPORT_SYMBOL_GPL(aout_notifier_call_chain);