Commit f7f3651e authored by Dmitry Torokhov's avatar Dmitry Torokhov

Input: iforce - remove "being used" silliness

The kernel is supposed to handle multiple devices, static flags
in packet handling code will never work.
Tested-by: default avatarTim Schumacher <timschumi@gmx.de>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent e93c9c99
......@@ -149,12 +149,6 @@ void iforce_process_packet(struct iforce *iforce, u16 cmd, unsigned char *data)
{
struct input_dev *dev = iforce->dev;
int i;
static int being_used = 0;
if (being_used)
dev_warn(&iforce->dev->dev,
"re-entrant call to iforce_process %d\n", being_used);
being_used++;
#ifdef CONFIG_JOYSTICK_IFORCE_232
if (HI(iforce->expect_packet) == HI(cmd)) {
......@@ -165,10 +159,8 @@ void iforce_process_packet(struct iforce *iforce, u16 cmd, unsigned char *data)
#endif
wake_up(&iforce->wait);
if (!iforce->type) {
being_used--;
if (!iforce->type)
return;
}
switch (HI(cmd)) {
......@@ -233,7 +225,6 @@ void iforce_process_packet(struct iforce *iforce, u16 cmd, unsigned char *data)
}
break;
}
being_used--;
}
int iforce_get_id_packet(struct iforce *iforce, char *packet)
......
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