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>
This commit is contained in:
John Fastabend 2011-10-06 08:52:44 +00:00 коммит произвёл David S. Miller
Родитель 6bd0e1cb10
Коммит 27737aa3a9
1 изменённых файлов: 18 добавлений и 0 удалений

Просмотреть файл

@ -24,8 +24,26 @@ enum dcbevent_notif_type {
DCB_APP_EVENT = 1, DCB_APP_EVENT = 1,
}; };
#ifdef CONFIG_DCB
extern int register_dcbevent_notifier(struct notifier_block *nb); extern int register_dcbevent_notifier(struct notifier_block *nb);
extern int unregister_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); 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 #endif