Commit 633354d1 authored by Dmitry Torokhov's avatar Dmitry Torokhov

Input: iforce - only call iforce_process_packet() if initialized

It is excessive to check if device is fully initialized in
iforce_process_packet(), as for USB-conected devices we do not start
collecting reports until the device is fully initialized.

Let's change serio transport code to not call iforce_process_packet()
until device initialization is done.
Tested-by: default avatarTim Schumacher <timschumi@gmx.de>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 2880dcf9
...@@ -172,9 +172,6 @@ void iforce_process_packet(struct iforce *iforce, ...@@ -172,9 +172,6 @@ void iforce_process_packet(struct iforce *iforce,
struct input_dev *dev = iforce->dev; struct input_dev *dev = iforce->dev;
int i, j; int i, j;
if (!iforce->type)
return;
switch (packet_id) { switch (packet_id) {
case 0x01: /* joystick position data */ case 0x01: /* joystick position data */
......
...@@ -172,7 +172,7 @@ static irqreturn_t iforce_serio_irq(struct serio *serio, ...@@ -172,7 +172,7 @@ static irqreturn_t iforce_serio_irq(struct serio *serio,
/* Signal that command is done */ /* Signal that command is done */
wake_up(&iforce->wait); wake_up(&iforce->wait);
} else { } else if (likely(iforce->type)) {
iforce_process_packet(iforce, iforce_serio->id, iforce_process_packet(iforce, iforce_serio->id,
iforce->data, iforce_serio->len); iforce->data, iforce_serio->len);
} }
......
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