[svn-commits] sruffell: linux/trunk r6551 - /linux/trunk/drivers/dahdi/wctc4xxp/base.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Fri May 1 11:42:48 CDT 2009
Author: sruffell
Date: Fri May 1 11:42:45 2009
New Revision: 6551
URL: http://svn.digium.com/svn-view/dahdi?view=rev&rev=6551
Log:
wctc4xxp: spin_trylock_irqsave is not defined on some kernels.
DAHDI-253
Modified:
linux/trunk/drivers/dahdi/wctc4xxp/base.c
Modified: linux/trunk/drivers/dahdi/wctc4xxp/base.c
URL: http://svn.digium.com/svn-view/dahdi/linux/trunk/drivers/dahdi/wctc4xxp/base.c?view=diff&rev=6551&r1=6550&r2=6551
==============================================================================
--- linux/trunk/drivers/dahdi/wctc4xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wctc4xxp/base.c Fri May 1 11:42:45 2009
@@ -2049,8 +2049,14 @@
/* If we can't grab this lock, another thread must already be checking
* the receive ring...so we should just finish up, and we'll try again
* later. */
+#if defined(spin_trylock_irqsave)
if (!spin_trylock_irqsave(&wc->rx_lock, flags))
return 0;
+#else
+ if (spin_is_locked(&wc->rx_lock))
+ return 0;
+ spin_lock_irqsave(&wc->rx_lock, flags);
+#endif
while ((cmd = wctc4xxp_retrieve(wc->rxd))) {
++count;
More information about the svn-commits
mailing list