[Prism54-devel] new commits, please test

Bruno Randolf bruno.randolf at 4g-systems.biz
Thu Mar 10 10:40:51 UTC 2005


On Thursday 10 March 2005 03:15, Luis R. Rodriguez wrote:
>  * islpci_dev.c (prism54_bring_down): use msleep(50) instead of
>  set_current_state(TASK_UNINTERRUPTIBLE) and
>  schedule_timeout(50*HZ/1000)

this breaks the kernel 2.4 builds where msleep is not available. something 
like this is needed to make it work again:


Index: ksrc/prismcompat24.h
===================================================================
--- ksrc/prismcompat24.h        (revision 528)
+++ ksrc/prismcompat24.h        (working copy)
@@ -77,4 +77,19 @@
 #define DMA_32BIT_MASK 0x00000000ffffffffULL
 #endif

+#if !defined(msec_to_jiffies)
+#define msecs_to_jiffies(msecs) ((HZ * msecs + 999) / 1000)
+#endif
+
+#if !defined(msleep)
+#define msleep(msecs) \
+{ \
+               unsigned long timeout = msecs_to_jiffies(msecs) + 1; \
+               while (timeout) { \
+                       set_current_state(TASK_UNINTERRUPTIBLE); \
+                       timeout = schedule_timeout(timeout); \
+               } \
+}
+#endif
+
 #endif                         /* _PRISM_COMPAT_H */


maybe it would be better to make this real functions like in 2.6 but i didn't 
know where to put them?

bruno
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://prism54.org/pipermail/prism54-devel/attachments/20050310/0523ec83/attachment-0001.pgp


More information about the Prism54-devel mailing list