summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2018-01-31 04:35:39 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2018-01-31 04:35:39 +0000
commitb54ef224bad032de739f9a5afbd9f3e75ab72a76 (patch)
tree889f7f8649e7ca0df7338fc7431d3e1078da6618
parentd429b96fec4dc128a7d2c9ef11e1254659325596 (diff)
add list_prev_entry()
-rw-r--r--sys/dev/pci/drm/drm_linux_list.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/drm_linux_list.h b/sys/dev/pci/drm/drm_linux_list.h
index 7c5af7f707a..cbb3535d66d 100644
--- a/sys/dev/pci/drm/drm_linux_list.h
+++ b/sys/dev/pci/drm/drm_linux_list.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: drm_linux_list.h,v 1.7 2017/07/01 16:14:10 kettenis Exp $ */
+/* $OpenBSD: drm_linux_list.h,v 1.8 2018/01/31 04:35:38 jsg Exp $ */
/* drm_linux_list.h -- linux list functions for the BSDs.
* Created: Mon Apr 7 14:30:16 1999 by anholt@FreeBSD.org
*/
@@ -121,6 +121,9 @@ list_del_init(struct list_head *entry) {
#define list_next_entry(pos, member) \
list_entry(((pos)->member.next), typeof(*(pos)), member)
+#define list_prev_entry(pos, member) \
+ list_entry(((pos)->member.prev), typeof(*(pos)), member)
+
#define list_for_each(entry, head) \
for (entry = (head)->next; entry != head; entry = (entry)->next)