Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -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 */
+1 −1
Original line number Diff line number Diff line
@@ -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);
		}