From 27737aa3a9f65012b3656b71e0ff230a4811da4d Mon Sep 17 00:00:00 2001 From: John Fastabend Date: Thu, 6 Oct 2011 08:52:44 +0000 Subject: dcb: Add stub routines for !CONFIG_DCB To avoid ifdefs in the other code that supports DCB notifiers add stub routines. This method seems popular in other net code for example 8021Q. Signed-off-by: John Fastabend Signed-off-by: David S. Miller --- include/net/dcbevent.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/include/net/dcbevent.h b/include/net/dcbevent.h index bc1e7ef4017..443626ed4cb 100644 --- a/include/net/dcbevent.h +++ b/include/net/dcbevent.h @@ -24,8 +24,26 @@ enum dcbevent_notif_type { DCB_APP_EVENT = 1, }; +#ifdef CONFIG_DCB extern int register_dcbevent_notifier(struct notifier_block *nb); extern int unregister_dcbevent_notifier(struct notifier_block *nb); extern int call_dcbevent_notifiers(unsigned long val, void *v); +#else +static inline int +register_dcbevent_notifier(struct notifier_block *nb) +{ + return 0; +} + +static inline int unregister_dcbevent_notifier(struct notifier_block *nb) +{ + return 0; +} + +static inline int call_dcbevent_notifiers(unsigned long val, void *v) +{ + return 0; +} +#endif /* CONFIG_DCB */ #endif -- cgit v1.2.3