* [KJ] [PATCH 9/21] polling loops: change exit condition to
@ 2005-12-04 0:17 Marcin Slusarz
0 siblings, 0 replies; only message in thread
From: Marcin Slusarz @ 2005-12-04 0:17 UTC (permalink / raw)
To: kernel-janitors
INPUT (KEYBOARD, MOUSE, JOYSTICK) DRIVERS
P: Vojtech Pavlik
M: vojtech@suse.cz
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
diff -upr -X linux-2.6.15-rc4/Documentation/dontdiff linux-2.6.15-rc4-orig/drivers/input/joystick/analog.c linux-2.6.15-rc4/drivers/input/joystick/analog.c
--- linux-2.6.15-rc4-orig/drivers/input/joystick/analog.c 2005-12-03 15:22:32.000000000 +0100
+++ linux-2.6.15-rc4/drivers/input/joystick/analog.c 2005-12-03 16:53:10.000000000 +0100
@@ -576,6 +576,7 @@ static int analog_init_masks(struct anal
static int analog_init_port(struct gameport *gameport, struct gameport_driver *drv, struct analog_port *port)
{
int i, t, u, v;
+ unsigned long end_time;
port->gameport = gameport;
@@ -591,7 +592,8 @@ static int analog_init_port(struct gamep
port->mask = (gameport_read(gameport) ^ t) & t & 0xf;
port->fuzz = (port->speed * ANALOG_FUZZ_MAGIC) / port->loop / 1000 + ANALOG_FUZZ_BITS;
- for (i = 0; i < ANALOG_INIT_RETRIES; i++) {
+ end_time = jiffies + msecs_to_jiffies(ANALOG_MAX_TIME * ANALOG_INIT_RETRIES);
+ while (time_before(jiffies, end_time)) {
if (!analog_cooked_read(port))
break;
msleep(ANALOG_MAX_TIME);
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-12-04 0:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-04 0:17 [KJ] [PATCH 9/21] polling loops: change exit condition to Marcin Slusarz
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.