From b470dd86f8b7f32a45f4dd50bd5ce0ce86ef09e9 Mon Sep 17 00:00:00 2001 From: Robert Noland Date: Mon, 13 Oct 2008 17:52:41 +0000 Subject: The linux list compat code had an error which prevented list_for_each_safe() from operating on a list with a single item. This code is used much more by the i915 driver with xorg-7.4. Correct it to match the actual linux implementation. Approved by: jhb (mentor) --- sys/dev/drm/drm_linux_list.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/drm/drm_linux_list.h b/sys/dev/drm/drm_linux_list.h index d0a5c7008a7cf..d2142a417ea7f 100644 --- a/sys/dev/drm/drm_linux_list.h +++ b/sys/dev/drm/drm_linux_list.h @@ -69,6 +69,6 @@ list_del(struct list_head *entry) { #define list_for_each_safe(entry, temp, head) \ for (entry = (head)->next, temp = (entry)->next; \ - temp != head; \ - entry = temp, temp = temp->next) + entry != head; \ + entry = temp, temp = entry->next) -- cgit v1.2.3