Skip to content

Commit

Permalink
dcb: Add stub routines for !CONFIG_DCB
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
John Fastabend authored and David S. Miller committed Oct 6, 2011
1 parent 6bd0e1c commit 27737aa
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions include/net/dcbevent.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 27737aa

Please sign in to comment.