From 810cef87de0d65e505e68ad39c469c2e9ce6d0a1 Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Wed, 18 Aug 2010 11:01:28 +0200 Subject: Correct logic for kernel MT slots devices This patch fixes the broken logic to detect the kernel MT slots protocol, such that MT slots devices may pass through mtdev properly. Signed-off-by: Henrik Rydberg --- src/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core.c b/src/core.c index c1f78b5..a6798b0 100644 --- a/src/core.c +++ b/src/core.c @@ -369,10 +369,10 @@ void mtdev_put_event(struct mtdev *dev, const struct input_event *ev) struct mtdev_state *state = dev->state; if (ev->type == EV_SYN && ev->code == SYN_REPORT) { bitmask_t head = state->outbuf.head; - if (dev->state) - convert_A_to_B(state, &dev->caps, ev); - else + if (dev->caps.has_slot) process_typeB(state); + else + convert_A_to_B(state, &dev->caps, ev); if (state->outbuf.head != head) evbuf_put(&state->outbuf, ev); } else { -- cgit v1.2.1