]> rtime.felk.cvut.cz Git - socketcan-devel.git/commitdiff
round_jiffies() has been introduced in 2.6.20.
authorhartkopp <hartkopp@030b6a49-0b11-0410-94ab-b0dab22257f2>
Mon, 5 Nov 2007 12:58:26 +0000 (12:58 +0000)
committerhartkopp <hartkopp@030b6a49-0b11-0410-94ab-b0dab22257f2>
Mon, 5 Nov 2007 12:58:26 +0000 (12:58 +0000)
Added version depended code for older Kernels.

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

kernel/2.6/net/can/af_can.c
kernel/2.6/net/can/proc.c

index 8a7583868e0f9c5f848b6f63efd36b459a8a2761..36f7a81dbef50d593fb5ddcd02580a6b663b5553 100644 (file)
@@ -1026,7 +1026,11 @@ static __init int can_init(void)
                stattimer.function = can_stat_update;
                stattimer.data = 0;
                /* update every second */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
                stattimer.expires = round_jiffies(jiffies + HZ);
+#else
+               stattimer.expires = jiffies + HZ;
+#endif
                /* start statistics timer */
                add_timer(&stattimer);
        } else
index 1886d401a6d0500f48b2d0a57bd19eef0731134c..a43f8f02f020fbfa89cf12cd26b19894c98ff3f6 100644 (file)
@@ -187,7 +187,11 @@ void can_stat_update(unsigned long data)
        stats.matches_delta   = 0;
 
        /* restart timer (one second) */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
        stattimer.expires = round_jiffies(jiffies + HZ);
+#else
+       stattimer.expires = jiffies + HZ;
+#endif
        add_timer(&stattimer);
 }