Input: iforce - signal command completion from transport code

Signalling command completion from iforce_process_packet() does
not make sense, as not all transport use the same data path for
both commands and motion data form the device, that is why USB
code already has to signal command completion iforce_usb_out().

Let's move signalling completion into individual transport
modules.

Tested-by: Tim Schumacher <timschumi@gmx.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
Dmitry Torokhov 2018-08-10 10:21:13 -07:00
Родитель d3cc100069
Коммит 2880dcf9cf
2 изменённых файлов: 6 добавлений и 5 удалений

Просмотреть файл

@ -172,8 +172,6 @@ void iforce_process_packet(struct iforce *iforce,
struct input_dev *dev = iforce->dev;
int i, j;
wake_up(&iforce->wait);
if (!iforce->type)
return;

Просмотреть файл

@ -169,10 +169,13 @@ static irqreturn_t iforce_serio_irq(struct serio *serio,
iforce->ecmd = (iforce_serio->id << 8) |
iforce_serio->idx;
memcpy(iforce->edata, iforce->data, IFORCE_MAX_LENGTH);
}
iforce_process_packet(iforce, iforce_serio->id,
iforce->data, iforce_serio->len);
/* Signal that command is done */
wake_up(&iforce->wait);
} else {
iforce_process_packet(iforce, iforce_serio->id,
iforce->data, iforce_serio->len);
}
iforce_serio->pkt = 0;
iforce_serio->id = 0;