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:40 +0200
commitd170e4aa1147a6cef7264fa69663e38f42d4a5fc (patch)
tree8cdca72a4899ab74978ad3d9504ed22dfe11229c
parentf0ecaf49c1630cdce3dd706264675f8e2ab5c418 (diff)
list.h: Add list_empty macro
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rw-r--r--isp/list.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/isp/list.h b/isp/list.h
index 081e2c4..e58d3fe 100644
--- a/isp/list.h
+++ b/isp/list.h
@@ -36,6 +36,11 @@ static inline void list_init(struct list_entry *list)
list->prev = list;
}
+static inline int list_empty(struct list_entry *list)
+{
+ return list->next == list;
+}
+
static inline void list_append(struct list_entry *entry, struct list_entry *list)
{
entry->next = list;