[svn-commits] sruffell: linux/trunk r8641 - in /linux/trunk: drivers/dahdi/ include/dahdi/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon May 17 09:45:16 CDT 2010


Author: sruffell
Date: Mon May 17 09:45:12 2010
New Revision: 8641

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=8641
Log:
dahdi: Check if wait_for_completion_timeout is backported.

CentOS4 has this backported in their 2.6.9 kernel.

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

Modified: linux/trunk/drivers/dahdi/Kbuild
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/Kbuild?view=diff&rev=8641&r1=8640&r2=8641
==============================================================================
--- linux/trunk/drivers/dahdi/Kbuild (original)
+++ linux/trunk/drivers/dahdi/Kbuild Mon May 17 09:45:12 2010
@@ -62,6 +62,10 @@
 # as part of an ALSA backport. TODO: Any better way to detect that?
 ifeq (1,$(shell fgrep -q ' hrtimer_set_expires' include/linux/hrtimer.h 2>/dev/null && echo 1))
 EXTRA_CFLAGS+=-DHAVE_HRTIMER_ACCESSORS=1
+endif
+
+ifeq (1,$(shell fgrep -q 'wait_for_completion_timeout' include/linux/completion.h 2>/dev/null && echo 1))
+CFLAGS_MODULE+=-DHAVE_WAIT_FOR_COMPLETION_TIMEOUT=1
 endif
 
 # In 2.6.18 skb_linearize changed; however, some distros backported the change

Modified: linux/trunk/include/dahdi/kernel.h
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/include/dahdi/kernel.h?view=diff&rev=8641&r1=8640&r2=8641
==============================================================================
--- linux/trunk/include/dahdi/kernel.h (original)
+++ linux/trunk/include/dahdi/kernel.h Mon May 17 09:45:12 2010
@@ -1209,6 +1209,7 @@
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 12)
 #define synchronize_rcu() synchronize_kernel()
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 11)
+#if !defined(HAVE_WAIT_FOR_COMPLETION_TIMEOUT)
 static inline unsigned long
 wait_for_completion_timeout(struct completion *x, unsigned long timeout)
 {
@@ -1221,6 +1222,7 @@
 
 	return timeout;
 }
+#endif
 #endif /* 2.6.11 */
 #endif /* 2.6.12 */
 #endif /* 2.6.14 */




More information about the svn-commits mailing list