diff options
author | Felix Kuehling <fxkuehl@gmx.de> | 2004-02-21 19:54:51 +0000 |
---|---|---|
committer | Felix Kuehling <fxkuehl@gmx.de> | 2004-02-21 19:54:51 +0000 |
commit | d0031f22cfecc2cce512aae66bedc9fe337f5d97 (patch) | |
tree | ad7ef7fcd40ec9959dc97a2f0b07135e6d275632 /linux | |
parent | 82157579b586c8f1e147250e09f0837214019680 (diff) |
Conditionally add definition of list_for_each_entry_safe for kernel
versions that don't have it.
Diffstat (limited to 'linux')
-rw-r--r-- | linux/drmP.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/linux/drmP.h b/linux/drmP.h index 742c4ac58..503d6c1b3 100644 --- a/linux/drmP.h +++ b/linux/drmP.h @@ -202,6 +202,14 @@ prefetch(pos->member.next)) #endif +#ifndef list_for_each_entry_safe +#define list_for_each_entry_safe(pos, n, head, member) \ + for (pos = list_entry((head)->next, typeof(*pos), member), \ + n = list_entry(pos->member.next, typeof(*pos), member); \ + &pos->member != (head); \ + pos = n, n = list_entry(n->member.next, typeof(*n), member)) +#endif + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,19) static inline struct page * vmalloc_to_page(void * vmalloc_addr) { |