Commit 99378fd2 authored by Linus Torvalds's avatar Linus Torvalds

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
parents 189addce 413d3732
...@@ -263,6 +263,13 @@ static int uinput_create_device(struct uinput_device *udev) ...@@ -263,6 +263,13 @@ static int uinput_create_device(struct uinput_device *udev)
return -EINVAL; return -EINVAL;
} }
if (test_bit(EV_ABS, dev->evbit)) {
input_alloc_absinfo(dev);
if (!dev->absinfo) {
error = -EINVAL;
goto fail1;
}
if (test_bit(ABS_MT_SLOT, dev->absbit)) { if (test_bit(ABS_MT_SLOT, dev->absbit)) {
nslot = input_abs_get_max(dev, ABS_MT_SLOT) + 1; nslot = input_abs_get_max(dev, ABS_MT_SLOT) + 1;
error = input_mt_init_slots(dev, nslot, 0); error = input_mt_init_slots(dev, nslot, 0);
...@@ -271,6 +278,7 @@ static int uinput_create_device(struct uinput_device *udev) ...@@ -271,6 +278,7 @@ static int uinput_create_device(struct uinput_device *udev)
} else if (test_bit(ABS_MT_POSITION_X, dev->absbit)) { } else if (test_bit(ABS_MT_POSITION_X, dev->absbit)) {
input_set_events_per_packet(dev, 60); input_set_events_per_packet(dev, 60);
} }
}
if (test_bit(EV_FF, dev->evbit) && !udev->ff_effects_max) { if (test_bit(EV_FF, dev->evbit) && !udev->ff_effects_max) {
printk(KERN_DEBUG "%s: ff_effects_max should be non-zero when FF_BIT is set\n", printk(KERN_DEBUG "%s: ff_effects_max should be non-zero when FF_BIT is set\n",
......
...@@ -42,13 +42,19 @@ config RMI4_SMB ...@@ -42,13 +42,19 @@ config RMI4_SMB
config RMI4_F03 config RMI4_F03
bool "RMI4 Function 03 (PS2 Guest)" bool "RMI4 Function 03 (PS2 Guest)"
depends on RMI4_CORE depends on RMI4_CORE
depends on SERIO=y || RMI4_CORE=SERIO
help help
Say Y here if you want to add support for RMI4 function 03. Say Y here if you want to add support for RMI4 function 03.
Function 03 provides PS2 guest support for RMI4 devices. This Function 03 provides PS2 guest support for RMI4 devices. This
includes support for TrackPoints on TouchPads. includes support for TrackPoints on TouchPads.
config RMI4_F03_SERIO
tristate
depends on RMI4_CORE
depends on RMI4_F03
default RMI4_CORE
select SERIO
config RMI4_2D_SENSOR config RMI4_2D_SENSOR
bool bool
depends on RMI4_CORE depends on RMI4_CORE
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment