From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
To: Benjamin Tissoires <benjamin.tissoires@gmail.com>,
Jiri Kosina <jkosina@suse.cz>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
David Herrmann <dh.herrmann@gmail.com>,
Henrik Rydberg <rydberg@euromail.se>,
Antonio Ospite <ospite@studenti.unina.it>,
simon@mungewell.org, case@corpsmoderne.net,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/3] Only process ABS_MT_SLOT where there are slots available
Date: Wed, 20 Nov 2013 16:32:19 -0500 [thread overview]
Message-ID: <1384983141-31019-2-git-send-email-benjamin.tissoires@redhat.com> (raw)
In-Reply-To: <1384983141-31019-1-git-send-email-benjamin.tissoires@redhat.com>
From: Antonio Ospite <ospite@studenti.unina.it>
This fixes the case when a non-multitouch device happens to have a HID
code equal to ABS_MT_SLOT, like the Sony Sixaxis has for the left dpad
analog control.
Updated to latest tree by Benjamin Tissoires.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
---
This patch was sent back in 2011 by Antonio and it was forgotten in the depth
of the LKML:
http://www.spinics.net/lists/linux-input/msg16881.html
Resurecting it now, as the bug is still there.
Antonio, could you please tell me if you still add your Signed-of-by line and
if I can keep your from?
Cheers,
Benjamin
drivers/input/input.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/input/input.c b/drivers/input/input.c
index fb513da..1198785 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -213,12 +213,12 @@ static int input_handle_abs_event(struct input_dev *dev,
bool is_mt_event;
int *pold;
- if (code == ABS_MT_SLOT) {
+ if (code == ABS_MT_SLOT && mt) {
/*
* "Stage" the event; we'll flush it later, when we
* get actual touch data.
*/
- if (mt && *pval >= 0 && *pval < mt->num_slots)
+ if (*pval >= 0 && *pval < mt->num_slots)
mt->slot = *pval;
return INPUT_IGNORE_EVENT;
--
1.8.3.1
next prev parent reply other threads:[~2013-11-20 21:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-20 21:32 [PATCH 0/3] Fixes for multitouch / generic gamepads interaction Benjamin Tissoires
2013-11-20 21:32 ` Benjamin Tissoires [this message]
2013-11-21 1:45 ` [PATCH 1/3] Only process ABS_MT_SLOT where there are slots available simon
2013-11-21 4:56 ` Dmitry Torokhov
2013-11-21 10:25 ` Antonio Ospite
2013-11-21 15:53 ` Benjamin Tissoires
2013-11-20 21:32 ` [PATCH 2/3] input: Introduce INPUT_PROP_MT Benjamin Tissoires
2013-11-21 4:57 ` Dmitry Torokhov
2013-11-20 21:32 ` [PATCH 3/3] input: reintroduce filtering of mt axis when the device is not multitouch Benjamin Tissoires
2013-11-21 12:38 ` [PATCH 0/3] Fixes for multitouch / generic gamepads interaction Henrik Rydberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1384983141-31019-2-git-send-email-benjamin.tissoires@redhat.com \
--to=benjamin.tissoires@redhat.com \
--cc=benjamin.tissoires@gmail.com \
--cc=case@corpsmoderne.net \
--cc=dh.herrmann@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=jkosina@suse.cz \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ospite@studenti.unina.it \
--cc=rydberg@euromail.se \
--cc=simon@mungewell.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).