Commit c0b3a38f authored by Romain Liévin's avatar Romain Liévin Committed by Linus Torvalds

[PATCH] tipar char driver: wrong timeout value

this patch (2.4 & 2.6) fixes a bug about the timeout value. The formula
used to calculate jiffies from timeout is wrong.
The new formula is ok and takes care of integer computation/rounding.
There is the same bug in the tiglusb.c module which will be fixed by another
patch.
parent 78fdb0c4
......@@ -121,7 +121,7 @@ init_ti_parallel(int minor)
/* ----- global defines ----------------------------------------------- */
#define START(x) { x=jiffies+HZ/(timeout/10); }
#define START(x) { x = jiffies + (HZ * timeout) / 10; }
#define WAIT(x) { \
if (time_before((x), jiffies)) return -1; \
if (need_resched()) schedule(); }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment