dl_list: Add DEFINE_DL_LIST

This allows statically defining an empty initialised list.
This commit is contained in:
Johannes Berg 2011-10-28 23:03:13 +03:00 committed by Jouni Malinen
parent b49d6ccb74
commit 6604da3cf0

View file

@ -95,4 +95,7 @@ static inline unsigned int dl_list_len(struct dl_list *list)
&item->member != (list); \ &item->member != (list); \
item = dl_list_entry(item->member.prev, type, member)) item = dl_list_entry(item->member.prev, type, member))
#define DEFINE_DL_LIST(name) \
struct dl_list name = { &(name), &(name) }
#endif /* LIST_H */ #endif /* LIST_H */