diff options
author | Dmitry Torokhov <dtor_core@ameritech.net> | 2006-01-31 01:31:07 -0500 |
---|---|---|
committer | Dmitry Torokhov <dtor_core@ameritech.net> | 2006-01-31 01:31:07 -0500 |
commit | 97d4ebfe7946bc9b89791c932a15c990a24aa94d (patch) | |
tree | 4ee4dcabaae114c40f398182c1088bf7f8595d40 /drivers/input | |
parent | 275c6ce25d679a4c0981a9a259e60e732a123cc6 (diff) |
Input: iforce - fix detection of USB devices
Recent conversion to wait_event_interruptible_timeout() caused
USB detection routine erroneously report timeouts for perfectly
working devices.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/joystick/iforce/iforce-packets.c | 4 | ||||
-rw-r--r-- | drivers/input/joystick/iforce/iforce-usb.c | 1 |
2 files changed, 2 insertions, 3 deletions
diff --git a/drivers/input/joystick/iforce/iforce-packets.c b/drivers/input/joystick/iforce/iforce-packets.c index 4a2629243e19..76cb1f88f4e8 100644 --- a/drivers/input/joystick/iforce/iforce-packets.c +++ b/drivers/input/joystick/iforce/iforce-packets.c | |||
@@ -167,9 +167,9 @@ void iforce_process_packet(struct iforce *iforce, u16 cmd, unsigned char *data, | |||
167 | iforce->expect_packet = 0; | 167 | iforce->expect_packet = 0; |
168 | iforce->ecmd = cmd; | 168 | iforce->ecmd = cmd; |
169 | memcpy(iforce->edata, data, IFORCE_MAX_LENGTH); | 169 | memcpy(iforce->edata, data, IFORCE_MAX_LENGTH); |
170 | wake_up(&iforce->wait); | ||
171 | } | 170 | } |
172 | #endif | 171 | #endif |
172 | wake_up(&iforce->wait); | ||
173 | 173 | ||
174 | if (!iforce->type) { | 174 | if (!iforce->type) { |
175 | being_used--; | 175 | being_used--; |
@@ -264,7 +264,7 @@ int iforce_get_id_packet(struct iforce *iforce, char *packet) | |||
264 | wait_event_interruptible_timeout(iforce->wait, | 264 | wait_event_interruptible_timeout(iforce->wait, |
265 | iforce->ctrl->status != -EINPROGRESS, HZ); | 265 | iforce->ctrl->status != -EINPROGRESS, HZ); |
266 | 266 | ||
267 | if (iforce->ctrl->status != -EINPROGRESS) { | 267 | if (iforce->ctrl->status) { |
268 | usb_unlink_urb(iforce->ctrl); | 268 | usb_unlink_urb(iforce->ctrl); |
269 | return -1; | 269 | return -1; |
270 | } | 270 | } |
diff --git a/drivers/input/joystick/iforce/iforce-usb.c b/drivers/input/joystick/iforce/iforce-usb.c index bc2fce60f9f8..fe79d158456d 100644 --- a/drivers/input/joystick/iforce/iforce-usb.c +++ b/drivers/input/joystick/iforce/iforce-usb.c | |||
@@ -95,7 +95,6 @@ static void iforce_usb_irq(struct urb *urb, struct pt_regs *regs) | |||
95 | goto exit; | 95 | goto exit; |
96 | } | 96 | } |
97 | 97 | ||
98 | wake_up(&iforce->wait); | ||
99 | iforce_process_packet(iforce, | 98 | iforce_process_packet(iforce, |
100 | (iforce->data[0] << 8) | (urb->actual_length - 1), iforce->data + 1, regs); | 99 | (iforce->data[0] << 8) | (urb->actual_length - 1), iforce->data + 1, regs); |
101 | 100 | ||