[svn-commits] sruffell: linux/trunk r8142 - in /linux/trunk: drivers/dahdi/ include/dahdi/
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Fri Feb 26 13:16:48 CST 2010
Author: sruffell
Date: Fri Feb 26 13:16:37 2010
New Revision: 8142
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=8142
Log:
dahdi_dynamic: Use kernel versions where interface changed for workarounds.
atomic_inc_return was added in 2.6.10, and synchronize_rcu() was added in
2.6.12.
Modified:
linux/trunk/drivers/dahdi/dahdi_dynamic_ethmf.c
linux/trunk/include/dahdi/kernel.h
Modified: linux/trunk/drivers/dahdi/dahdi_dynamic_ethmf.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/dahdi_dynamic_ethmf.c?view=diff&rev=8142&r1=8141&r2=8142
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi_dynamic_ethmf.c (original)
+++ linux/trunk/drivers/dahdi/dahdi_dynamic_ethmf.c Fri Feb 26 13:16:37 2010
@@ -400,7 +400,7 @@
struct net_device *dev;
unsigned char addr[ETH_ALEN];
int spans_ready = 0, index = 0;
-#if LINUX_VERSION < KERNEL_VERSION(2, 6, 18)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 10)
static spinlock_t lock = SPIN_LOCK_UNLOCKED;
unsigned long flags;
#endif
@@ -415,7 +415,7 @@
return 0;
}
-#if LINUX_VERSION < KERNEL_VERSION(2, 6, 18)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 10)
if (!atomic_read(&z->ready)) {
spin_lock_irqsave(&lock, flags);
atomic_inc(&z->ready);
Modified: linux/trunk/include/dahdi/kernel.h
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/include/dahdi/kernel.h?view=diff&rev=8142&r1=8141&r2=8142
==============================================================================
--- linux/trunk/include/dahdi/kernel.h (original)
+++ linux/trunk/include/dahdi/kernel.h Fri Feb 26 13:16:37 2010
@@ -1181,7 +1181,6 @@
(signal_pending((p)) && sigismember(&(p)->pending.signal, SIGKILL))
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18)
-#define synchronize_rcu() synchronize_kernel()
static inline void list_replace(struct list_head *old, struct list_head *new)
{
new->next = old->next;
@@ -1191,6 +1190,8 @@
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 14)
#define kzalloc(a, b) kcalloc(1, a, b)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 12)
+#define synchronize_rcu() synchronize_kernel()
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 11)
static inline unsigned long
wait_for_completion_timeout(struct completion *x, unsigned long timeout)
@@ -1205,6 +1206,7 @@
return timeout;
}
#endif /* 2.6.11 */
+#endif /* 2.6.12 */
#endif /* 2.6.14 */
#endif /* 2.6.18 */
#endif /* 2.6.25 */
More information about the svn-commits
mailing list