From a77b09892d3cb88f94f200efc39c95aa53f46ad6 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Mon, 25 Jul 2011 12:06:20 +0200 Subject: list.h: Add list_insert_before and list_insert_after macros Signed-off-by: Laurent Pinchart --- isp/list.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'isp') diff --git a/isp/list.h b/isp/list.h index e58d3fe..de6e383 100644 --- a/isp/list.h +++ b/isp/list.h @@ -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; -- cgit v1.2.3