From: jsg Date: Wed, 18 Jan 2023 23:47:25 +0000 (+0000) Subject: add __list_add() for 6.1.7 drm X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=b26ab6c35d92aee08b0eb8b23498e30c5a090cf1;p=openbsd add __list_add() for 6.1.7 drm --- diff --git a/sys/dev/pci/drm/include/linux/list.h b/sys/dev/pci/drm/include/linux/list.h index b415974174a..a9d591d800c 100644 --- a/sys/dev/pci/drm/include/linux/list.h +++ b/sys/dev/pci/drm/include/linux/list.h @@ -1,4 +1,4 @@ -/* $OpenBSD: list.h,v 1.6 2023/01/01 01:34:58 jsg Exp $ */ +/* $OpenBSD: list.h,v 1.7 2023/01/18 23:47:25 jsg Exp $ */ /* drm_linux_list.h -- linux list functions for the BSDs. * Created: Mon Apr 7 14:30:16 1999 by anholt@FreeBSD.org */ @@ -75,6 +75,16 @@ list_is_last(const struct list_head *list, return list->next == head; } +static inline void +__list_add(struct list_head *new, struct list_head *prev, + struct list_head *next) +{ + next->prev = new; + new->next = next; + new->prev = prev; + prev->next = new; +} + static inline void list_add(struct list_head *new, struct list_head *head) { (head)->next->prev = new;