mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 08:14:15 +08:00
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: Tim Schumacher <timschumi@gmx.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
parent
2880dcf9cf
commit
633354d191
@ -172,9 +172,6 @@ void iforce_process_packet(struct iforce *iforce,
|
||||
struct input_dev *dev = iforce->dev;
|
||||
int i, j;
|
||||
|
||||
if (!iforce->type)
|
||||
return;
|
||||
|
||||
switch (packet_id) {
|
||||
|
||||
case 0x01: /* joystick position data */
|
||||
|
@ -172,7 +172,7 @@ static irqreturn_t iforce_serio_irq(struct serio *serio,
|
||||
|
||||
/* Signal that command is done */
|
||||
wake_up(&iforce->wait);
|
||||
} else {
|
||||
} else if (likely(iforce->type)) {
|
||||
iforce_process_packet(iforce, iforce_serio->id,
|
||||
iforce->data, iforce_serio->len);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user