diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2014-08-09 14:00:51 +0200 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2014-08-09 16:40:41 +0200 |
commit | 966bc8a51503d4ac3e51f767d7dcabdb013160b3 (patch) | |
tree | d2f7c6a98d30d18a51c7dab4a5fb260b5e0e9268 /backport | |
parent | 7b74819d3532a47bff0ca15b6c0fcaabca0287e3 (diff) |
backports: add list_next_entry()
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'backport')
-rw-r--r-- | backport/backport-include/linux/list.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/backport/backport-include/linux/list.h b/backport/backport-include/linux/list.h index 4e1b3ca4..90428307 100644 --- 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 */ |