[PATCH] input: Blacklist digitizers from joydev.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch has been included in Ubuntu. Does it look sensible for upstream inclusion?

Stefan


>From 79d826fd1e314846b889fd524eab0a9445f0f70a Mon Sep 17 00:00:00 2001
From: Stefan Bader <stefan.bader@xxxxxxxxxxxxx>
Date: Tue, 28 Apr 2009 16:44:18 +0200
Subject: [PATCH] UBUNTU: SAUCE: input: Blacklist digitizers from joydev.c

Bug: #300143
BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/300143

BTN_TOUCH is not set by the wacom driver which causes it to be handled by the
joydev driver while the resulting device is broken. This causes problems
with applications that try to use a joystick device.

Signed-off-by: Tim Cole <tim.cole@xxxxxxxxxxxxx>
Signed-off-by: Stefan Bader <stefan.bader@xxxxxxxxxxxxx>
Acked-by: Tim Gardner <tim.gardner@xxxxxxxxxxxxx>
Acked-by: Amit Kucheria <amit.kucheria@xxxxxxxxxxxxx>
---
 drivers/input/joydev.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c
index a85b148..cef2333 100644
--- a/drivers/input/joydev.c
+++ b/drivers/input/joydev.c
@@ -846,7 +846,13 @@ static const struct input_device_id joydev_blacklist[] = {
 				INPUT_DEVICE_ID_MATCH_KEYBIT,
 		.evbit = { BIT_MASK(EV_KEY) },
 		.keybit = { [BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH) },
-	},	/* Avoid itouchpads, touchscreens and tablets */
+	},	/* Avoid itouchpads and touchscreens */
+	{
+		.flags = INPUT_DEVICE_ID_MATCH_EVBIT |
+				INPUT_DEVICE_ID_MATCH_KEYBIT,
+		.evbit = { BIT_MASK(EV_KEY) },
+		.keybit = { [BIT_WORD(BTN_DIGI)] = BIT_MASK(BTN_DIGI) },
+	},	/* Avoid tablets, digitisers and similar devices */
 	{ }	/* Terminating entry */
 };
 
-- 
1.5.4.3


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux