]> rtime.felk.cvut.cz Git - socketcan-devel.git/commitdiff
make bcm.c compile with 2.6.26 again.
authorhartkopp <hartkopp@030b6a49-0b11-0410-94ab-b0dab22257f2>
Wed, 21 May 2008 19:43:41 +0000 (19:43 +0000)
committerhartkopp <hartkopp@030b6a49-0b11-0410-94ab-b0dab22257f2>
Wed, 21 May 2008 19:43:41 +0000 (19:43 +0000)
TODO: extend strip-src to cope with '=='

git-svn-id: svn://svn.berlios.de//socketcan/trunk@736 030b6a49-0b11-0410-94ab-b0dab22257f2

kernel/2.6/net/can/bcm.c
kernel/2.6/net/can/compat.h

index 783acd3468ec3bd70b9a012b6dd66db562468aad..73576b8351a3fa429cc2ce029cef1d9d096c05fb 100644 (file)
@@ -529,8 +529,8 @@ static void bcm_rx_changed(struct bcm_op *op, struct can_frame *data)
        bcm_send_to_user(op, &head, data, 1);
 }
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
-/* TODO: move to linux/hrtimer.h */
+#if LINUX_VERSION_CODE == KERNEL_VERSION(2,6,25)
+/* is part of linux/hrtimer.h since 2.6.26 */
 static inline int hrtimer_callback_running(struct hrtimer *timer)
 {
         return timer->state & HRTIMER_STATE_CALLBACK;
index 2a7b01e94cdb6b8f4085fb9a0020fee3ddf1b19f..8f7260f12ef9d8df3642b18bcb9ae5c412caeed8 100644 (file)
@@ -46,4 +46,11 @@ static inline void skb_set_timestamp(struct sk_buff *skb,
 #define __dev_get_by_index(ns, ifindex) __dev_get_by_index(ifindex)
 #endif
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
+#include <linux/hrtimer.h>
+static inline int hrtimer_callback_running(struct hrtimer *timer)
+{
+        return timer->state & HRTIMER_STATE_CALLBACK;
+}
+#endif
 #endif