tvin_notifier.c 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*
  2. * TVIN Notifier
  3. *
  4. * Author: Bobby Yang <bo.yang@amlogic.com>
  5. *
  6. * Copyright (C) 2010 Amlogic Inc.
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. */
  12. #include<linux/module.h>
  13. #include "tvin_notifier.h"
  14. /*
  15. * source dec operations notifier
  16. */
  17. static BLOCKING_NOTIFIER_HEAD(tvin_dec_notifier_list);
  18. int tvin_dec_notifier_register(struct notifier_block *nb)
  19. {
  20. return blocking_notifier_chain_register(&tvin_dec_notifier_list, nb);
  21. }
  22. EXPORT_SYMBOL_GPL(tvin_dec_notifier_register);
  23. int tvin_dec_notifier_unregister(struct notifier_block *nb)
  24. {
  25. return blocking_notifier_chain_unregister(&tvin_dec_notifier_list, nb);
  26. }
  27. EXPORT_SYMBOL_GPL(tvin_dec_notifier_unregister);
  28. int tvin_dec_notifier_call(unsigned long val, void *v)
  29. {
  30. return blocking_notifier_call_chain(&tvin_dec_notifier_list, val, v);
  31. }
  32. EXPORT_SYMBOL_GPL(tvin_dec_notifier_call);
  33. static ATOMIC_NOTIFIER_HEAD(tvin_check_notifier_list);
  34. int tvin_check_notifier_register(struct notifier_block *nb)
  35. {
  36. return atomic_notifier_chain_register(&tvin_check_notifier_list, nb);
  37. }
  38. EXPORT_SYMBOL_GPL(tvin_check_notifier_register);
  39. int tvin_check_notifier_unregister(struct notifier_block *nb)
  40. {
  41. return atomic_notifier_chain_unregister(&tvin_check_notifier_list, nb);
  42. }
  43. EXPORT_SYMBOL_GPL(tvin_check_notifier_unregister);
  44. int tvin_check_notifier_call(unsigned long val, void *v)
  45. {
  46. return atomic_notifier_call_chain(&tvin_check_notifier_list, val, v);
  47. }
  48. EXPORT_SYMBOL_GPL(tvin_check_notifier_call);