From d170e4aa1147a6cef7264fa69663e38f42d4a5fc Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Mon, 25 Jul 2011 12:06:20 +0200 Subject: list.h: Add list_empty macro Signed-off-by: Laurent Pinchart --- isp/list.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'isp') 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; -- cgit v1.2.3