aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorJohn Fastabend <john.r.fastabend@intel.com>2011-10-06 04:52:44 -0400
committerDavid S. Miller <davem@davemloft.net>2011-10-06 15:49:51 -0400
commit27737aa3a9f65012b3656b71e0ff230a4811da4d (patch)
tree31c30d3ecb12152c5257b6eb8111e4549a054f9c /include/net
parent6bd0e1cb10b6d14dda4a8806d0a2f4f0bbf01931 (diff)
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 <john.r.fastabend@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/dcbevent.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/net/dcbevent.h b/include/net/dcbevent.h
index bc1e7ef40171..443626ed4cbc 100644
--- a/include/net/dcbevent.h
+++ b/include/net/dcbevent.h
@@ -24,8 +24,26 @@ enum dcbevent_notif_type {
24 DCB_APP_EVENT = 1, 24 DCB_APP_EVENT = 1,
25}; 25};
26 26
27#ifdef CONFIG_DCB
27extern int register_dcbevent_notifier(struct notifier_block *nb); 28extern int register_dcbevent_notifier(struct notifier_block *nb);
28extern int unregister_dcbevent_notifier(struct notifier_block *nb); 29extern int unregister_dcbevent_notifier(struct notifier_block *nb);
29extern int call_dcbevent_notifiers(unsigned long val, void *v); 30extern int call_dcbevent_notifiers(unsigned long val, void *v);
31#else
32static inline int
33register_dcbevent_notifier(struct notifier_block *nb)
34{
35 return 0;
36}
37
38static inline int unregister_dcbevent_notifier(struct notifier_block *nb)
39{
40 return 0;
41}
42
43static inline int call_dcbevent_notifiers(unsigned long val, void *v)
44{
45 return 0;
46}
47#endif /* CONFIG_DCB */
30 48
31#endif 49#endif