summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2011-07-25 12:06:20 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2011-09-04 15:39:43 +0200
commita77b09892d3cb88f94f200efc39c95aa53f46ad6 (patch)
tree29ec6c2b1b6eac0306c60fc098c1f6fec3e8dfc3
parentd170e4aa1147a6cef7264fa69663e38f42d4a5fc (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.h10
1 files changed, 10 insertions, 0 deletions
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;