aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-02-09 14:58:05 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2017-02-09 14:58:05 -0500
commit99378fd26803328cbab64ae60fa98e1394d07a6d (patch)
tree1ab2771c56963fec8669ac87c7058c84345365c4
parent189addce85330208bea50ea7f1483b58822e93cf (diff)
parent413d37326700aaf708730b940b04192c36e13ef4 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input fixes from Dmitry Torokhov: "A fix for a crash in uinput, and a fix for build errors when HID-RMI is built-in but SERIO is a module" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: synaptics-rmi4 - select 'SERIO' when needed Input: uinput - fix crash when mixing old and new init style
-rw-r--r--drivers/input/misc/uinput.c20
-rw-r--r--drivers/input/rmi4/Kconfig8
2 files changed, 21 insertions, 7 deletions
diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c
index 92595b98e7ed..022be0e22eba 100644
--- a/drivers/input/misc/uinput.c
+++ b/drivers/input/misc/uinput.c
@@ -263,13 +263,21 @@ static int uinput_create_device(struct uinput_device *udev)
263 return -EINVAL; 263 return -EINVAL;
264 } 264 }
265 265
266 if (test_bit(ABS_MT_SLOT, dev->absbit)) { 266 if (test_bit(EV_ABS, dev->evbit)) {
267 nslot = input_abs_get_max(dev, ABS_MT_SLOT) + 1; 267 input_alloc_absinfo(dev);
268 error = input_mt_init_slots(dev, nslot, 0); 268 if (!dev->absinfo) {
269 if (error) 269 error = -EINVAL;
270 goto fail1; 270 goto fail1;
271 } else if (test_bit(ABS_MT_POSITION_X, dev->absbit)) { 271 }
272 input_set_events_per_packet(dev, 60); 272
273 if (test_bit(ABS_MT_SLOT, dev->absbit)) {
274 nslot = input_abs_get_max(dev, ABS_MT_SLOT) + 1;
275 error = input_mt_init_slots(dev, nslot, 0);
276 if (error)
277 goto fail1;
278 } else if (test_bit(ABS_MT_POSITION_X, dev->absbit)) {
279 input_set_events_per_packet(dev, 60);
280 }
273 } 281 }
274 282
275 if (test_bit(EV_FF, dev->evbit) && !udev->ff_effects_max) { 283 if (test_bit(EV_FF, dev->evbit) && !udev->ff_effects_max) {
diff --git a/drivers/input/rmi4/Kconfig b/drivers/input/rmi4/Kconfig
index 8993983e3fe4..bb7762bf2879 100644
--- a/drivers/input/rmi4/Kconfig
+++ b/drivers/input/rmi4/Kconfig
@@ -42,13 +42,19 @@ config RMI4_SMB
42config RMI4_F03 42config RMI4_F03
43 bool "RMI4 Function 03 (PS2 Guest)" 43 bool "RMI4 Function 03 (PS2 Guest)"
44 depends on RMI4_CORE 44 depends on RMI4_CORE
45 depends on SERIO=y || RMI4_CORE=SERIO
46 help 45 help
47 Say Y here if you want to add support for RMI4 function 03. 46 Say Y here if you want to add support for RMI4 function 03.
48 47
49 Function 03 provides PS2 guest support for RMI4 devices. This 48 Function 03 provides PS2 guest support for RMI4 devices. This
50 includes support for TrackPoints on TouchPads. 49 includes support for TrackPoints on TouchPads.
51 50
51config RMI4_F03_SERIO
52 tristate
53 depends on RMI4_CORE
54 depends on RMI4_F03
55 default RMI4_CORE
56 select SERIO
57
52config RMI4_2D_SENSOR 58config RMI4_2D_SENSOR
53 bool 59 bool
54 depends on RMI4_CORE 60 depends on RMI4_CORE