[dahdi-commits] sruffell: linux/trunk r5770 - /linux/trunk/drivers/dahdi/
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Tue Jan 20 15:23:35 CST 2009
Author: sruffell
Date: Tue Jan 20 15:23:34 2009
New Revision: 5770
URL: http://svn.digium.com/svn-view/dahdi?view=rev&rev=5770
Log:
Some distributions have backported the hrtimer_get_expires and
hrtimer_set_expires functions from 2.6.28. Therefore, dahdi-linux cannot use
the linux version code to determine if these functions are present or not.
This patch actively checks for those functions.
Closes Issue: #14166
Thanks to bergolth for the patch.
Modified:
linux/trunk/drivers/dahdi/Kbuild
linux/trunk/drivers/dahdi/dahdi_dummy.c
Modified: linux/trunk/drivers/dahdi/Kbuild
URL: http://svn.digium.com/svn-view/dahdi/linux/trunk/drivers/dahdi/Kbuild?view=diff&rev=5770&r1=5769&r2=5770
==============================================================================
--- linux/trunk/drivers/dahdi/Kbuild (original)
+++ linux/trunk/drivers/dahdi/Kbuild Tue Jan 20 15:23:34 2009
@@ -56,6 +56,10 @@
EXTRA_CFLAGS+=-Drw_lock_t=rwlock_t
endif
+ifeq (1,$(shell fgrep -q ' hrtimer_set_expires' include/linux/hrtimer.h 2>/dev/null && echo 1))
+EXTRA_CFLAGS+=-DHAVE_HRTIMER_ACCESSORS=1
+endif
+
dahdi-objs := dahdi-base.o
dahdi_echocan_hpec-objs := hpec/dahdi_echocan_hpec.o
Modified: linux/trunk/drivers/dahdi/dahdi_dummy.c
URL: http://svn.digium.com/svn-view/dahdi/linux/trunk/drivers/dahdi/dahdi_dummy.c?view=diff&rev=5770&r1=5769&r2=5770
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi_dummy.c (original)
+++ linux/trunk/drivers/dahdi/dahdi_dummy.c Tue Jan 20 15:23:34 2009
@@ -89,8 +89,10 @@
#define USB2420
#endif
-#if defined(USE_HIGHRESTIMER) && ( LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28) )
-/* compatibility with new hrtimer interface */
+#if defined(USE_HIGHRESTIMER) && \
+ (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 27)) || \
+ (!defined(HAVE_HRTIMER_ACCESSORS))
+/* Compatibility with new hrtimer interface */
static inline ktime_t hrtimer_get_expires(const struct hrtimer *timer)
{
return timer->expires;
More information about the dahdi-commits
mailing list