dcbevent.h 766 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2010, Intel Corporation.
  4. *
  5. * Author: John Fastabend <[email protected]>
  6. */
  7. #ifndef _DCB_EVENT_H
  8. #define _DCB_EVENT_H
  9. struct notifier_block;
  10. enum dcbevent_notif_type {
  11. DCB_APP_EVENT = 1,
  12. };
  13. #ifdef CONFIG_DCB
  14. int register_dcbevent_notifier(struct notifier_block *nb);
  15. int unregister_dcbevent_notifier(struct notifier_block *nb);
  16. int call_dcbevent_notifiers(unsigned long val, void *v);
  17. #else
  18. static inline int
  19. register_dcbevent_notifier(struct notifier_block *nb)
  20. {
  21. return 0;
  22. }
  23. static inline int unregister_dcbevent_notifier(struct notifier_block *nb)
  24. {
  25. return 0;
  26. }
  27. static inline int call_dcbevent_notifiers(unsigned long val, void *v)
  28. {
  29. return 0;
  30. }
  31. #endif /* CONFIG_DCB */
  32. #endif