diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2011-07-25 12:06:20 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2011-09-04 15:39:43 +0200 |
commit | a77b09892d3cb88f94f200efc39c95aa53f46ad6 (patch) | |
tree | 29ec6c2b1b6eac0306c60fc098c1f6fec3e8dfc3 | |
parent | d170e4aa1147a6cef7264fa69663e38f42d4a5fc (diff) |
list.h: Add list_insert_before and list_insert_after macros
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rw-r--r-- | isp/list.h | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -57,6 +57,16 @@ static inline void list_prepend(struct list_entry *entry, struct list_entry *lis list->next = entry; } +static inline void list_insert_after(struct list_entry *entry, struct list_entry *after) +{ + list_prepend(entry, after); +} + +static inline void list_insert_before(struct list_entry *entry, struct list_entry *before) +{ + list_append(entry, before); +} + static inline void list_remove(struct list_entry *entry) { entry->prev->next = entry->next; |