tipar char driver: wront timeout value
PATCH 1/1 tipar char driver: wront timeout value
Hi,
this patch fixes a bug on the timeout value. The formula used to calculate jiffies from timeout was wrong. The new formula is ok and takes care of integer computation/rounding.
This bug has already been fixed in the 2.6 kernel.
Please apply, Romain.
=============[ cut here ]===============
drivers/char/tipar.c +1 -1
@@ -124,7 +124,7 @@/* ----- 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(); }
Signature · 3 lines
Romain Liévin : <[email protected]> Web site : http://www.lievin.net "Linux, y'a moins bien mais c'est plus cher !"