projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7b74819
)
backports: add list_next_entry()
author
Hauke Mehrtens
<hauke@hauke-m.de>
Sat, 9 Aug 2014 12:00:51 +0000
(14:00 +0200)
committer
Hauke Mehrtens
<hauke@hauke-m.de>
Sat, 9 Aug 2014 14:40:41 +0000
(16:40 +0200)
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
backport/backport-include/linux/list.h
patch
|
blob
|
history
diff --git
a/backport/backport-include/linux/list.h
b/backport/backport-include/linux/list.h
index 4e1b3ca44e77c772690510861b16b173625f647f..90428307a2892071db5a237e7cafc2020f629f2c 100644
(file)
--- a/
backport/backport-include/linux/list.h
+++ b/
backport/backport-include/linux/list.h
@@
-63,4
+63,14
@@
(!list_empty(ptr) ? list_first_entry(ptr, type, member) : NULL)
#endif /* list_first_entry_or_null */
+#ifndef list_next_entry
+/**
+ * list_next_entry - get the next element in list
+ * @pos: the type * to cursor
+ * @member: the name of the list_struct within the struct.
+ */
+#define list_next_entry(pos, member) \
+ list_entry((pos)->member.next, typeof(*(pos)), member)
+#endif /* list_next_entry */
+
#endif /* __BACKPORT_LIST_H */