[svn-commits] sruffell: linux/trunk r7571 - /linux/trunk/include/dahdi/kernel.h

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Nov 12 13:56:52 CST 2009


Author: sruffell
Date: Thu Nov 12 13:56:49 2009
New Revision: 7571

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=7571
Log:
kernel.h: Define 'list_replace' for kernels < 2.6.18

Modified:
    linux/trunk/include/dahdi/kernel.h

Modified: linux/trunk/include/dahdi/kernel.h
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/include/dahdi/kernel.h?view=diff&rev=7571&r1=7570&r2=7571
==============================================================================
--- linux/trunk/include/dahdi/kernel.h (original)
+++ linux/trunk/include/dahdi/kernel.h Thu Nov 12 13:56:49 2009
@@ -1173,6 +1173,16 @@
 #define kzalloc(a, b) kcalloc(1, a, b)
 #endif
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18)
+static inline void list_replace(struct list_head *old, struct list_head *new)
+{
+        new->next = old->next;
+        new->next->prev = new;
+        new->prev = old->prev;
+        new->prev->next = new;
+}
+#endif
+
 #ifndef DMA_BIT_MASK
 #define DMA_BIT_MASK(n)	(((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
 #endif




More information about the svn-commits mailing list